logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José (bluemail) <jose.j...@bluewin.ch>
Subject Parsing a log generated by a RollingFileAppender with LINQ to XML
Date Fri, 27 Jun 2008 22:03:10 GMT
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>
.....

 

 


Mime
View raw message