Added a custom column as suggested here. Things are working fine when ever I log something into this column using the code line
log4net.GlobalContext.Properties["CustomColumn"] = "Custom value";
But if I pass null instead as below
log4net.GlobalContext.Properties["CustomColumn"] = null;
this is logged as (null)(a string null included in brakets). This also happens if I do not log at all, like I comment the code as shown below.
//log4net.GlobalContext.Properties["CustomColumn"] = null;
So the question is, is there a way to make it actually null in the database, instead of a string - (null). I am using ms sql server 2008 r2
I have modified the insert statement of the commandText value in Web.config file to
Now this works fine.
try this