+-

我为日志记录创建了一个单独的控制台应用程序,然后将单个控制台dll添加到了多个日志记录应用程序中.一旦运行该应用程序,它的日志记录就会很好,但还会显示以下错误
log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in the application's .config file. Check your .config file for the <log4net> and <configSections> elements. The configuration section should look like: <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
log4net:错误XmlConfigurator:无法在应用程序的.config文件中找到配置节’log4net’.检查您的.config文件中的和元素.配置部分应如下所示:
任何想法?
最佳答案
加
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
...
</configuration>
到您的app / web.config文件
点击查看更多相关文章
转载注明原文:c#-log4net:ERROR XmlConfigurator:无法在应用程序的.config中找到配置节’log4net’ - 乐贴网