logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-1087) Reload of RolloverStrategy doesn't work
Date Sun, 22 Nov 2015 05:50:10 GMT

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

Ralph Goers resolved LOG4J2-1087.
---------------------------------
       Resolution: Duplicate
    Fix Version/s: 2.5

The fix for this is implemented as part of the fix for LOG4J2-381. Please verify and close.

> Reload of RolloverStrategy doesn't work
> ---------------------------------------
>
>                 Key: LOG4J2-1087
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1087
>             Project: Log4j 2
>          Issue Type: Bug
>            Reporter: Benjamin Jaton
>            Assignee: Ralph Goers
>             Fix For: 2.5
>
>         Attachments: reload.txt
>
>
> I am using this configuration :
> {code}<?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="DEBUG" monitorInterval="2">
>   <Appenders>
>     <RollingFile name="RollingFile" fileName="/tmp/test/app.log" filePattern="/tmp/test/app.log.%i">
>       <PatternLayout>
>         <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
>       </PatternLayout>
>       <Policies>
>         <SizeBasedTriggeringPolicy size="100KB"/>
>       </Policies>
>       <DefaultRolloverStrategy max="5"/>
>     </RollingFile>
>   </Appenders>
>   <Loggers>
>     <Root level="info" includeLocation="false">
>       <AppenderRef ref="RollingFile"/>
>     </Root>
>   </Loggers>
> </Configuration>{code}
> I am changing the DefaultRolloverStrategy "max" attribute from 5 to 10.
> I can see the reloading take place from the StatusLogger (full log attached):
> {code}DEBUG Starting configuration XmlConfiguration[location=/usr/local/apps/log4j2-test.xml]
> (...)
> DEBUG Found factory method [createStrategy]: public static org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy
org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.createStrategy(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.apache.logging.log4j.core.config.Configuration).
> 2015-07-24 12:08:00,938 DEBUG Calling createStrategy on class org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy
for element DefaultRolloverStrategy with params(name="10", name="null", name="null", name="null",
Configuration(/usr/local/apps/log4j2-test.xml)){code}
> So log4j2 is seeing the changes, but there is still only 5 files produced 1->5.
> (I made sure that I was producing enough log data)
> If I change the message pattern, I see it change in the log file, but not the RolloverStrategy
parameters.



--
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