I have log4net running on my AsP.NET site. I'm able to log messages to my DB Table, but it isn't logging the ThreadContext properties. For example:
ThreadContext.Properties["Url"] = HttpContext.Current.Request.Url.ToString();
ThreadContext.Properties["HttpReferer"] = HttpContext.Current.Request.ServerVariables["HTTP_REFERER"];
My log4net.config adds those values as parameters into my SQL DB table:
<parameter>
<parameterName value="@URL"/>
<dbType value="String"/>
<size value="512"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{log4net:Url}"/>
</layout>
</parameter>
<parameter>
<parameterName value="@HttpReferer"/>
<dbType value="String"/>
<size value="512"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{log4net:HttpReferer}"/>
</layout>
</parameter>
As I debug, I see that those ThreadContext properties are being set, but they aren't getting into the DB.
How can I get that to work?