第一步:
下载 log4net.dll ,并添加引用。您可以去http://logging.apache.org/log4net/download_log4net.cgi下载 log4net.dll!
第二步:
在 App.config 中添加节点:
<?xml version="1.0"?>
<configuration>
<configSections>
<!--log4net配置-->
<section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
</configSections>
<!--log4net配置-->
<log4net>