I'm currently working with an application that uses log4net. Logging works fine when the application is started through Windows explorer, but if the application is set as the Windows shell, nothing gets logged. Are there any log4net dependencies that Windows explorer provides that are not getting consumed when the application is the shell?
Edit:
log4net gets initialized and configured in a different assembly after the application has started up via OnStartUp()
(this is a WPF application).
Init and configuration of log4net looks like this:
var assembly = Assembly.GetEntryAssembly();
log4net.GlobalContext.Properties["ApplicationName"] = (assembly != null) ? assembly.GetName().Name : "Unmanaged";
var log4NetFileInfo = new FileInfo("log4net.config");
log4net.Config.XmlConfigurator.ConfigureAndWatch(log4NetFileInfo);