[ 
https://issues.apache.org/jira/browse/LOG4NET-610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dominik Psenner resolved LOG4NET-610.
-------------------------------------
    Resolution: Duplicate
      Assignee: Dominik Psenner

Hi Kevin,

the application restarts rolling with index 1 after a restart, doesn't it? 
That's a flaw of the rolling file appender when configured with a datepattern 
and the composite rolling style. It is hard to fix. We are aware that the 
rolling file appender needs to be rewritten from scratch and there has been 
some effort to do so, but so far we have nothing that is ready for production 
environments. The configuration options for the next generation rolling file 
appender will however be slimmed down for good, meaning that it will only 
provide a small subset of the current configuration options. Consider changing 
your configuration to either roll by date or roll by size, but not both.

Best regards,
Dominik

> Log file will be override
> -------------------------
>
>                 Key: LOG4NET-610
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-610
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders, Core
>    Affects Versions: 2.0.8
>         Environment: Windows server 2012 64bit
>            Reporter: Kevin Chang
>            Assignee: Dominik Psenner
>            Priority: Major
>              Labels: #override
>         Attachments: Error.png, Question2.png
>
>
> <appendToFile value="true" />
>  <maximumFileSize value="4MB" />
>  <maxSizeRollBackups value="-1" />
>  <rollingStyle value="Composite" />
>  <countDirection value="1" />
>  <staticLogFileName value="false" />
> <datePattern value="'Abc-'yyyyMMdd'.log'" />
>  <preserveLogFileNameExtension value="true" />
> My log4net config as below, and I find some question should be enhancement.
>  # If  my datePatten Set Abc (1 capital letter), Log4net core may course 
> override log file.
> Some user has same 
> question(https://blog.gss.com.tw/index.php/2017/11/11/log4net/)
>  #  If the preserveLogFileNameExtension = true, when the Log create to 11th, 
> it will override first file.
> (Example:Abc-20180820.0.log、20180820.1.log.....20180820.10.log、20180820.11.log..then
>   the log will override 20180820.1.log again..)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to