Expanding on the previous answer -
To add a trace listener for the log4net.Internal.Debug trace, add this to your app config:
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add
name="textWriterTraceListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\temp\log4net.txt" />
</listeners>
</trace>
</system.diagnostics>
Replace the initializeData attribute value above with your desired log file path. Be sure the application or ASP.NET server process has permission to write to this file.
Another thing you can do is inspect the messages that are returned from the log4net configuration on startup. As of log4net version 1.2.11, the XmlConfigurator.Configure() methods return an ICollection containing strings listing problems encountered during the configuration process.
So if you've got something like this:
XmlConfigurator.Configure();
change it to
ICollection configMessages = XmlConfigurator.Configure();
and inspect configMessages in a debugger, or print them out somewhere, e.g.
foreach (string msg in configMessages)
{
Console.WriteLine(msg);
}
If all else fails, download the log4net source, add the project to your solution, and reference the project instead of log4net.dll. Now you can step into the log4net calls in the debugger.