在.net 2.0 WinForm程序中配置log4net来记录日志(入门级)
参考网上现有资料,自己整理了步骤:
1.在WindowsApplication项目新增“应用程序配置文件”.
2.将一下内容Copy至“configuration”节点中
<
configSections
>
< section name ="log4net" type ="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</ configSections >
< log4net >
< root >
< level value ="ALL" />
< appender-ref ref ="rollingFile" />
</ root >
< section name ="log4net" type ="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</ configSections >
< log4net >
< root >
< level value ="ALL" />
< appender-ref ref ="rollingFile" />
</ root >