unique log file with log4net
Posted
by Luca Romagnoli
on Stack Overflow
See other posts from Stack Overflow
or by Luca Romagnoli
Published on 2010-03-18T13:33:34Z
Indexed on
2010/03/18
13:41 UTC
Read the original article
Hit count: 382
hi i'm using log4net for logging my website. Every day a new file is created like "filename.log24-06-2009"
this is the code in the web.config file:
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="App_Data\Missioni.log" />
<appendToFile value="true" />
<rollingStyle value="Composite" />
<!--<datePattern value="yyyy-MM-dd" />-->
<maxSizeRollBackups value="5" />
<maximumFileSize value="5MB" />
<layout type="log4net.Layout.PatternLayout">
<header value="[Header]
" />
<footer value="[Footer]
" />
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingLogFileAppender" />
</root>
</log4net>
How can i do for use a unique log file?
thanks
© Stack Overflow or respective owner