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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2017/03/31 06:14:41 UTC

[jira] [Resolved] (LOG4J2-1859) Add rolling date support to fileName, RollingRandomAccessFile

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

Ralph Goers resolved LOG4J2-1859.
---------------------------------
    Resolution: Not A Problem

This is working as designed. The fileName is indeed a file name that never changes while the application is running.  If you do not want this behavior upgrade to the latest version of Log4j 2 and do not specify the fileName attribute.

> Add rolling date support to fileName, RollingRandomAccessFile
> -------------------------------------------------------------
>
>                 Key: LOG4J2-1859
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1859
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.6.2
>         Environment: All
>            Reporter: Danny Chen
>            Priority: Minor
>
> We are currently using Log4j2 version 2.6.2.  Within our configuration, we are using RollingRandomAccessFile. For the "filePattern", there is date support and rolling date support.  But for "fileName", there is no date rolling support.
> Example:
> <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="logs/app-${date:yyyy-MM-dd}.log" filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
> With the above config, once the rolling is done on the next date, the current log file is still the current date.  It seems as the current log file name is always fixed.  There is no rolling to it.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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