You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Harel E. (JIRA)" <ji...@apache.org> on 2013/09/02 01:17:51 UTC

[jira] [Updated] (LOG4J2-380) RollingFile Appender is placing archived logs in the wrong directory

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

Harel E. updated LOG4J2-380:
----------------------------

    Description: 
I'm using RollingFile appender with archiving to a separate directory.
The archive directory pattern is yyyy-MM.
Up until 2013-08-30, everything worked just fine.
All the logs for August were placed inside directory 2013-08

On 2013-09-01 00:01, log4j2 placed the log for 2013-08-31 inside directory 2013-09, instead of 2013-08

-bash-4.1$ ls -l 2013-09
total 8
-rw-rw-r-- 1 tomcat tomcat 4846 Sep  1 00:01 rws-2013-08-31.log.gz


Here's the configuration I'm using:


{code:xml}

<RollingFile name="RollingFile" fileName="${base}/rws.log" filePattern="${base}/$${date:yyyy-MM}/rws-%d{yyyy-MM-dd}.log.gz">
   <PatternLayout>
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}{UTC} [%t] %p %c{1} - %m%n</pattern>
   </PatternLayout>
   <Policies>
     <TimeBasedTriggeringPolicy/>
   </Policies>
</RollingFile>

{code}

  was:
I'm using RollingFile appender with archiving to a separate directory.
The archive directory pattern is yyyy-MM.
Up until 2013-08-30, everything worked just fine.
All the logs for August were placed inside directory 2013-08

On 2013-09-01 00:01, log4j2 placed the log for 2013-08-31 inside directory 2013-09, instead of 2013-08

-bash-4.1$ ls -l 2013-09
total 8
-rw-rw-r-- 1 tomcat tomcat 4846 Sep  1 00:01 rws-2013-08-31.log.gz


Here's the configuration I'm using:



<RollingFile name="RollingFile" fileName="${base}/rws.log"
                     filePattern="${base}/$${date:yyyy-MM}/rws-%d{yyyy-MM-dd}.log.gz">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}{UTC} [%t] %p %c{1} - %m%n</pattern>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy/>
            </Policies>
        </RollingFile>



    
> RollingFile Appender is placing archived logs in the wrong directory
> --------------------------------------------------------------------
>
>                 Key: LOG4J2-380
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-380
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta8
>         Environment: System timezone is UTC
>            Reporter: Harel E.
>
> I'm using RollingFile appender with archiving to a separate directory.
> The archive directory pattern is yyyy-MM.
> Up until 2013-08-30, everything worked just fine.
> All the logs for August were placed inside directory 2013-08
> On 2013-09-01 00:01, log4j2 placed the log for 2013-08-31 inside directory 2013-09, instead of 2013-08
> -bash-4.1$ ls -l 2013-09
> total 8
> -rw-rw-r-- 1 tomcat tomcat 4846 Sep  1 00:01 rws-2013-08-31.log.gz
> Here's the configuration I'm using:
> {code:xml}
> <RollingFile name="RollingFile" fileName="${base}/rws.log" filePattern="${base}/$${date:yyyy-MM}/rws-%d{yyyy-MM-dd}.log.gz">
>    <PatternLayout>
>       <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}{UTC} [%t] %p %c{1} - %m%n</pattern>
>    </PatternLayout>
>    <Policies>
>      <TimeBasedTriggeringPolicy/>
>    </Policies>
> </RollingFile>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org