It should be the Type of the current class that's doing the logging: private readonly static Type declaringType = typeof(ExtendedLogger);
This is an ok way to add additional properties to a loggingEvent: loggingEvent.Properties["Additional"] = "Additional info"; ----- Original Message ---- From: Michael Richman <[EMAIL PROTECTED]> To: "[email protected]" <[email protected]> Sent: Wednesday, August 6, 2008 3:03:51 PM Subject: Adding properties to a logging event 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, log.Logger.Repository, log.Logger.Name, log4net.Core.Level.Info, "This is a Message", new Exception()); loggingEvent.Properties["Additional"] =3D "Additional info"; log.Logger.Log(loggingEvent);
