Monday, January 26, 2015

setting property variables in log4net implementations

In the XML for configuration they look like this:

<conversionPattern value=\"%date %property{Whatever} %message %newline\" />

 
 

Per this you may set values in C# like so:

log4net.ThreadContext.Properties["Whatever"] = "foo";

No comments:

Post a Comment