You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/07/06 02:47:00 UTC
[jira] [Commented] (LOG4J2-1964) Dynamic reconfiguration does not
work for filePattern of RollingFile
[ https://issues.apache.org/jira/browse/LOG4J2-1964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16075831#comment-16075831 ]
ASF subversion and git services commented on LOG4J2-1964:
---------------------------------------------------------
Commit 05ef4b32d154c8bb5dd75a94247948818bba743c in logging-log4j2's branch refs/heads/master from [~phymbert]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=05ef4b3 ]
[LOG4J2-1964] Dynamic reconfiguration does not work for filePattern of
RollingFile. Apply patch with minor tweaks. Closes #90.
> Dynamic reconfiguration does not work for filePattern of RollingFile
> --------------------------------------------------------------------
>
> Key: LOG4J2-1964
> URL: https://issues.apache.org/jira/browse/LOG4J2-1964
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.8.2
> Environment: JDK 1.7.80
> Reporter: Xiaoshuang LU
>
> The initial log4j2.xml file was
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="INFO" monitorInterval="60">
> <Properties>
> <Property name="LOG_HOME">./logs</Property>
> </Properties>
> <Appenders>
> <RollingFile
> name="RollingFileAppender"
> fileName="${LOG_HOME}/log.log"
> filePattern="${LOG_HOME}/log.log.%d{yyyy-MM-dd}.%i">
> <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
> <PatternLayout pattern="%d{DEFAULT} %p %t %c %L: %m%n"/>
> <Policies>
> <OnStartupTriggeringPolicy/>
> <!--<TimeBasedTriggeringPolicy/>-->
> <SizeBasedTriggeringPolicy size="256MB"/>
> </Policies>
> <DefaultRolloverStrategy max="8"/>
> </RollingFile>
> </Appenders>
> <Loggers>
> <Root level="INFO">
> <AppenderRef ref="RollingFileAppender"/>
> </Root>
> </Loggers>
> </Configuration>
> {code}
> And then I changed filePattern to
> {code}
> filePattern="${LOG_HOME}/log.log.%i"
> {code}
> Log file names still contain date.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)