当我尝试调用时,我收到以下异常
var log = LogManager.GetLogger(this.GetType());
A first chance exception of type ‘Common.Logging.ConfigurationException’ occurred in Common.Logging.dll@H_301_6@
An unhanded exception of type ‘Common.Logging.ConfigurationException’ occurred in Common.Logging.dll@H_301_6@
Additional information: Failed obtaining configuration for Common.Logging from configuration section ‘common/logging’.@H_301_6@
这是一个.NET 4应用程序@H_301_6@
> log4net.dll
> Common.Logging.dll
> Common.Logging.log4net.dll@H_301_6@
<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> <configSections> <sectionGroup name="common"> <section name="logging" type="Common.Logging.ConfigurationSectionHandler,Common.Logging" /> </sectionGroup> </configSections> <common> <logging> <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter,Common.Logging"> <arg key="level" value="ALL" /> <arg key="showLogName" value="true" /> <arg key="showDataTime" value="true" /> <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /> </factoryAdapter> </logging> </common> </configuration>
我试图像这样打电话:@H_301_6@
var log = LogManager.GetLogger(this.GetType()); log.Debug(m => m("testing"));
我失踪了什么@H_301_6@