logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Finker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1440) OnStartupTriggeringPolicy rolls over on every reconfiguration
Date Mon, 20 Jun 2016 16:58:05 GMT

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

Leon Finker commented on LOG4J2-1440:
-------------------------------------

1. Confirmed.
2. For empty files and when specifying <OnStartupTriggeringPolicy minSize="0" />,
DefaultRolloverStrategy.rollover always specifies renameEmptyFiles=false so the old empty
file is just always deleted.
{noformat}
org.apache.logging.log4j.core.appender.rolling.action.FileRenameAction.<init>(java.io.File,
java.io.File, boolean) line: 53	
org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.rollover(org.apache.logging.log4j.core.appender.rolling.RollingFileManager)
line: 548	
org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager(org.apache.logging.log4j.core.appender.rolling.RollingFileManager).rollover(org.apache.logging.log4j.core.appender.rolling.RolloverStrategy)
line: 211	
{noformat}

> OnStartupTriggeringPolicy rolls over on every reconfiguration
> -------------------------------------------------------------
>
>                 Key: LOG4J2-1440
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1440
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.6.1
>            Reporter: Ralph Goers
>            Assignee: Ralph Goers
>             Fix For: 2.6.2
>
>
> The OnStartupTriggeringPolicy was modified to roll over when the configuration is processed
instead of waiting for the first log event and to only roll over if the file is not emoty.
This leads to two issues:
> # The roll over is only supposed to occur when Log4j is configured for the first time
in the JVM.
> # The user may have wanted to roll over empty files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message