logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Wallis" <mail...@wallis.ca>
Subject Parsing XmlLayout formatted events
Date Thu, 02 Dec 2004 19:53:25 GMT
Hi, I'm using the UdpAppender to send events to another server on our network. I've got Chainsaw
working for examining the events in real-time, but have also written my own app to receive
the events. The events are sent to the app formatted using XmlLayout. In the app I would now
like to parse the event info and insert the details into a database.

Is there an easy way to parse XmlLayout-formatted events? I was hoping for something like
LoggingEvent.LoadXml() but it doesn't exist :)

Am I on my own here? If so, what would one usually do with XmlLayout-formatted events?

Thanks,
Simon.

PS. Here's a sample event formatted with XmlLayout:

	<log4net:event logger="log4netTestHarness.WebForm1" timestamp="2004-12-02T14:22:09.4570099-05:00"
level="FATAL" thread="30636" domain="/LM/w3svc/1/root/test/log4netTestHarness-1-127465056731440543"
username="NT AUTHORITY\NETWORK SERVICE">
		<log4net:message><![CDATA[This is a FATAL event.]]></log4net:message>
		<log4net:properties>
			<log4net:data name="log4net:HostName" value="ts1wdadesk08"/>
		</log4net:properties>
		<log4net:exception>Exception: System.ApplicationException Message: this is a test
exception</log4net:exception>
	</log4net:event>


Mime
View raw message