配置文件 log4net.config内容,关于样式部分参考https://logging.apache.org/log4net/download_log4net.cgi
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<log4net>
<!--定义输出到文件中-->
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<!--定义文件存放位置-->
<file value="D:\config\RevitLogJerry_" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<!--<datePattern value="yyyy\\yyyyMM\\yyyyMMdd'.txt'"/>-->
<datePattern value="yyyyMMddhh'.log'" />
<staticLo