One reason comes to mind: since the static constructor of the class Appis the first bit of your code to be run, you will create an instance ILogbefore you configure log4net. Therefore, the instance ILogwill not be used. Generally, you should do something like this:
public partial class App : Application
{
private static ILog log;
static App()
{
XmlConfigurator.Configure();
log = LogManager.GetLogger(typeof(App));
}
}
, MethodBase . typeof(App)? / , , ... typeof(App) ...