[
https://issues.apache.org/jira/browse/LOG4NET-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397247#comment-13397247
]
akanksha gupta edited comment on LOG4NET-345 at 6/20/12 4:24 AM:
-----------------------------------------------------------------
yes i have tried but it is appending date after every file name created on same
date,what i want is for the same day if because of size file gets roll over
name should be "SantorinExplorer.1.log" and on next day it should be renamed
"SantorinnExplorer.1.12-06-12.log".
the result after setting:-
<rollingStyle value="Composite" />
<DatePattern value=".yyyy-MM-dd.lo\\g"/>
<file value="Log/SantorinExplorer"/>
<rollingMode value="Date"/>
<staticLogFileName value="false"/>
Log file names:-
SantorinExplorer.2012-06-22- should be SantorinExplorer on 2012-06-22 and on
2012-06-23 should be SantorinExplorer.2012-06-22
SantorinExplorer.2012-06-22.log- should be SantorinExplorer.2012-06-22.1.log
SantorinExplorer.2012-06-22.log.2-should be SantorinExplorer.2012-06-22.2.log
SantorinExplorer.2012-06-23
was (Author: akanksha):
yes i have tried but it is appending date after every file name created on
same date,what i want is for the same day if because of size file gets roll
over name should be "SantorinExplorer.1.log" and on next day it should be
renamed "SantorinnExplorer.1.12-06-12.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