<configuration>
...
<log4net>
<root>
<level
value="ALL"
/>
<appender-ref
ref="LogFileAppender"
/>
</root>
<appender
name="LogFileAppender"
type="log4net.Appender.RollingFileAppender,log4net">
<param
name="File"
value="C:\Log\SampleLog.txt"
/>
<param
name="AppendToFile"
value="true"
/>
<rollingStyle
value="Size"
/>
<maxSizeRollBackups
value="2"
/>
<maximumFileSize
value="100KB"
/>
<staticLogFileName
value="true"
/>
<datePattern
value="yyyyMMdd"
/>
<layout
type="log4net.Layout.PatternLayout">
<conversionPattern
value="%date
[%thread] %-5level %logger - %message%newline"
/>
</layout>
</appender>
</log4net>
</configuration>
No hay comentarios:
Publicar un comentario