[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    [jira] [Comment Edited] (LOG4J2-385) Unable to roll log files monthly
From:       "Remko Popma (JIRA)" <jira () apache ! org>
Date:       2014-01-31 4:22:14
Message-ID: JIRA.12666870.1378295367135.15427.1391142134018 () arcas
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/LOG4J2-385?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=13887434#comment-13887434 ] 

Remko Popma edited comment on LOG4J2-385 at 1/31/14 4:21 AM:
-------------------------------------------------------------

What do Log4j-1.2 and Logback do in the above scenarios? Considering easy migration, \
we probably want to follow them (unless they do something very strange...)

Edit:
To answer my own question: 
* Monthly rollover occurs at the beginning of each month.
* Weekly rollover occurs at the first day of each week. The first day of the week \
                depends on the locale.
* Daily rollover occurs at midnight each day.
* Log4J-1.2 also has an option to rollover both at midnight and at noon during the \
                day, so twice each day.
* Hourly rollover occurs at the beginning of each hour.
* Minutely(?) rollover occurs at the beginning of each minute.

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html
 http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy


was (Author: remkop@yahoo.com):
What do Log4j-1.2 and Logback do in the above scenarios? Considering easy migration, \
we probably want to follow them (unless they do something very strange...)

> Unable to roll log files monthly
> --------------------------------
> 
> Key: LOG4J2-385
> URL: https://issues.apache.org/jira/browse/LOG4J2-385
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.0-beta8
> Environment: Java 1.7.0_25, Windows 7 64bit, IntelliJ IDEA 12 Ultimate
> Reporter: Ace Funk
> Assignee: Remko Popma
> Attachments: LOG4J2-385.patch
> 
> 
> Attempting to use FastRollingFile appender and configure log file rollover to occur \
> monthly.  When {{filePattern="logs/app-%d\{yyyy-MM}.log.gz"}} is used, at \
> application startup an archive file is created immediately (app-2013-01.log.gz) \
> even if no log previously existed.  A log file is created, but only a single entry \
> is made into the log.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic