Configure log4net in web.config instead of separate file?
Using v6.1.6, has anyone successfully configured log4net via web.config section instead of using the /config/log4net.config file? My goal is to use web.config transformations.
I've moved the section into web.config and removed the "log4net.Config" appSetting. After turning on log4net debugging, I've confirmed it doesn't load any config at all.
I've noticed that Umbraco.Web.UI takes the unusual approach of configuring log4net via an assembly attribute in AssemblyInfo.cs. According to the log4net docs tho, this should still pick up an application-specific config file (web.config).
Configure log4net in web.config instead of separate file?
Using v6.1.6, has anyone successfully configured log4net via web.config section instead of using the /config/log4net.config file? My goal is to use web.config transformations.
I've moved the section into web.config and removed the "log4net.Config" appSetting. After turning on log4net debugging, I've confirmed it doesn't load any config at all.
I've noticed that Umbraco.Web.UI takes the unusual approach of configuring log4net via an assembly attribute in AssemblyInfo.cs. According to the log4net docs tho, this should still pick up an application-specific config file (web.config).
Hi Bob,
We ran into the same issue.
The solution is to set the appsetting "log4net.config" to this:
And change the element: <log4net configSource="config\log4net.config" />
to to your liking.
We used these transformations:
is working on a reply...