You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by hb...@softhome.net on 2005/06/14 06:34:06 UTC

how to log custom properties

Hi, 

I am using
Log4net : 1.2.9, .Net 1.1 

If I need to log certain custom properties along with the log message what 
is the best way to do it. I see ThreadContext.Properties and 
LogicalThreadContext.Properties. Not sure which of the two to use. Would 
like to know specific scenarios for each of the two. 

Also I guess once I set  a property on ThreadContext.Properties it will be 
logged for all subsequent log calls on that thread. I don't want it that 
way. I need to attach custom property only for a particular log call and not 
for subsequent logs calls on the same thread. Is that possible? 

Thanks for all the support that this group has been providing. It is really 
helping me. 

Cheers,
Hemant