logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Richman <Michael.Rich...@pgn.com>
Subject Adding properties to a logging event
Date Wed, 06 Aug 2008 19:03:51 GMT
I'm trying to add properties to a logging event so that the adoAppender can=pick up these properties
and use them in the insert SQL statement.

I've followed the example of creating a loggingEvent, but for the life of me, I can't figure
out what the callStackBoundaryDeclaringType would be. Can someone help me figure out what
the first parameter is to pass to the LoggingEvent constructor?

Also, is there a simpler way to add event specific context so that the appender can pick up
the properties? I know I can use MDC or NDC or thread context or global context, but these
are properties that are specific to the event, not those larger contexts.

My code fragment is as follows:

log4net.Core.LoggingEvent loggingEvent =3D new log4net.Core.LoggingEvent(ca= llerStackBoundaryDeclaringType,




"This is a Message",

new Exception());

loggingEvent.Properties["Additional"] =3D "Additional info";


View raw message