日期:2014-05-18 浏览次数:20801 次
System.IO.File.AppendAllText("c:\\temp\\log.txt", "In the beginning, God created the heavens and the earth...\n");
------解决方案--------------------
这个是我们用的
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<param name="File" value="C:\test.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Size" />
<param name="MaxSizeRollBackups" value="10" />
<param name="MaximumFileSize" value="10000KB" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%date{dd MMM yyyy HH:mm:ss,fff} [%t] %-5p %c [%x] - %m%n" />
</layout>
</appender>