I am using extra property which has to be logged into database at the time of exception. Please check at this link for extra property usage. https://www.codeproject.com/articles/140911/log4net-tutorial
I want to add a check in webconfig if that property is not initialized do something otherwise if that property is initialized do something else. How to do that?
From comment:
log4net.ThreadContext.Properties["Property1"] = someval; I am setting this property in some cases. But when I use %property{Property1} it displays values for cases which I have set. But for those cases where I have not specified values it logs (null) into database column. How to avoid null value and add blank space?