Using log4net, I have saved custom information in the following way
ThreadContext.Properties["context"] = info;
How can I output only this specific property, using the PatternLayout?
If i use %property it prints the whole collection like this:
{log4net:HostName=wrkst16, context=[my stuff here]}
I only want the content of “context” itself though. I tried %properties['context'], but it just appends the ['context'] part:
{log4net:HostName=wrkst16, context=[my stuff here]}['context']
Any way to get only a specific item of the collection?
This works: