Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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).
We ran into the same issue.
The solution is to set the appsetting "log4net.config" to this:
<add key="log4net.Config" value="web.config" />
And change the element: <log4net configSource="config\log4net.config" />
to to your liking.
We used these transformations:
<add key="log4net.Config" value="web.config" xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
... your entire new log4net setup ...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted