[ 
https://issues.apache.org/jira/browse/LOG4NET-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397229#comment-13397229
 ] 

Ron Grabowski commented on LOG4NET-345:
---------------------------------------

Did you try Google or stackoverflow.com?

http://stackoverflow.com/questions/1165084/log4net-rolling-daily-filename-with-date-in-the-file-name

<param name="DatePattern" value="dd.MM.yyyy'.log'" />
                
> log file naming issue
> ---------------------
>
>                 Key: LOG4NET-345
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-345
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>         Environment: Asp.net application
>            Reporter: akanksha gupta
>            Priority: Critical
>
> hi,
> i am using log4net in my asp.net application,
> How can I change the configuration so files are rolled to 
> [FileName][Date].[ext] rather than [FileName].[ext][Date]
> my web.config file is as follows:-
> <
> log4net>
> <
> logger name="WebTFEUI">
> <
> level value="ALL"/>
> <
> appender-ref ref="RollingFile"/>
> </
> logger>
> <
> appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
> <!--
> <rollingStyle value="Composite" />
> <datePattern value="yyyyMMdd" />
> <preserveLogFileNameExtension value="true"/>
> -->
> <!--
> <file>
> Sets the file where the log output will go. 
> -->
> <
> file value="Log/SantorinEditor.log"/>
> <!--
> <appendToFile>
> Gets or sets a flag that indicates weather the file should be
> appended to or overwritten.
> If the value is set to false then the file will be overwritten, if 
> it is set to true then the file will be appended to. 
> -->
> <
> appendToFile value="true"/>
> <!--
> <rollingMode>
> Style of rolling to use
> 1. Roll files based only on the size of the file "Size".
> 2. Roll files based only on the date "Date". 
> -->
> <
> rollingMode value="Size"/>
> <!--
> <maxSizeRollBackups>
> Gets or sets the maximum number of backup files that are kept before
> the oldest is erased.
> If set to zero, then there will be no backup files and the log file 
> will be truncated when it reaches "MaxFileSize".
> -->
> <
> maxSizeRollBackups value="10"/>
> <!--
> <maximumFileSize>
> Gets or sets the maximum size that the output file is allowed to reach
> before being rolled over to backup files.
> -->
> <
> maximumFileSize value="1024"/>
> <!--
> <staticLogFileName>
> Gets or sets a value indicting whether to always log to the same file.
> "true" if always should be logged to the same file, otherwise "false".
> By default(true) file.log is always the current file. Optionally(false)
> file.log.yyyy-mm-dd for current formatted datePattern can be the currently
> logging file.
> -->
> <
> staticLogFileName value="true"/>
> <
> layout type="log4net.Layout.PatternLayout">
> <
> conversionPattern value="%d{yyyy-MM-dd HH:mm:ss} %p : %m%n"/>
> </
> layout>
> <!--
> <filter>
> This is a simple filter based on "Level" matching.
> The filter admits below options 
> 1. "LevelMin"
> 2. "LevelMax"
> that determine the range of priorities that are matched. 
> Priorities of levels.
> ERROR<WARN<INFO1<INFO2<INFO3<INFO4
> -->
> <
> filter type="log4net.Filter.LevelRangeFilter">
> <
> param name="LevelMin" value="ERROR"/>
> <
> param name="LevelMax" value="INFO3"/>
> </
> filter>
> </
> appender>
> </
> log4net>
> currently i am using 1.2.0 version of log4net and i found 1.2.11 version has 
> fix this issue so by just changing rollingFileappender.cs can solve my 
> problem or not??????

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to