Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: Parsing a log generated by a RollingFileAppender with LINQ to XML
Prev Next
You are not authorized to post a reply.

Author Messages
José Joye

06/28/2008 12:03 AM  

Hello,

This post is not directly related to log4net. However, I have a parsing issue with one of the generated log file.

I'm currently trying to parse (with LINQ to XML) a log file generated by a RollingFileAppender.
It has the format as shown at the end of this post (XML fragment, undeclared namespace).

I tried to load it using the XElement.Load() method. However, it throws an exception telling me that the "log4j" namespace is undeclared.

Has anyone already tried to load such a file using linq?

Thanks for any feedback!
José

 

<log4j:event logger="InternalLog" timestamp="1214275497000" level="DEBUG" thread="943180"><log4j:message>completed registering new logger for category AFCLOGGING</log4j:message><log4j:properties><log4j:data name="application" value="WindowsCE" /><log4j:data name="log4net:UserName" value="NOT AVAILABLE" /><log4j:data name="log4jmachinename" value="WindowsCE" /><log4j:data name="log4net:Identity" value="NOT AVAILABLE" /><log4j:data name="log4net:HostName" value="WindowsCE" /><log4j:data name="log4japp" value="DBUtilities.SQL.UnitTestsCE.exe" /></log4j:properties><log4j:locationInfo class="AFCLogging.Logging" method="Logging" file="Logging.cs" line="82" /></log4j:event>

<log4j:event logger="InternalLog" timestamp="1214275498000" level="DEBUG" thread="943180"><log4j:message>completed registering new logger for category InternalLog</log4j:message><log4j:properties><log4j:data name="application" value="WindowsCE" /><log4j:data name="log4net:UserName" value="NOT AVAILABLE" /><log4j:data name="log4jmachinename" value="WindowsCE" /><log4j:data name="log4net:Identity" value="NOT AVAILABLE" /><log4j:data name="log4net:HostName" value="WindowsCE" /><log4j:data name="log4japp" value="DBUtilities.SQL.UnitTestsCE.exe" /></log4j:properties><log4j:locationInfo class="AFCLogging.Logging" method="Logging" file="Logging.cs" line="82" /></log4j:event>
.....

 

 

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > Parsing a log generated by a RollingFileAppender with LINQ to XML



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement