I'm referring to the excellent post :
Log4Net, how to add a custom field to my logging
But it doesn't give me the entire solution.
No problem to log a string like "This is a test", but If I want to log a variable, it's responding (null).
Here is my snipped code not working:
log4net.GlobalContext.Properties["versionid"] = Variables.IDVERSION;
Here is my working snipped code :
log4net.GlobalContext.Properties["versionid"] = " This is a test";
Although, IDVERSION is a public property systematically updated in my code c#.
Has anyone an idea How to solve this problem? I think I'm near the solution.