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 "Kiran Kumar Vadla (JIRA)" <ji...@apache.org> on 2015/12/14 09:22:46 UTC
[jira] [Created] (LOG4J2-1224) Log4j2 Rolling file appender not
working
Kiran Kumar Vadla created LOG4J2-1224:
-----------------------------------------
Summary: Log4j2 Rolling file appender not working
Key: LOG4J2-1224
URL: https://issues.apache.org/jira/browse/LOG4J2-1224
Project: Log4j 2
Issue Type: Question
Components: Appenders
Affects Versions: 2.5
Reporter: Kiran Kumar Vadla
Priority: Minor
Hi ,
I am using log4j 2.5 and using rolling file appender . Following is the configuration of log4j.xml . Just to test I have kept the size as 1 KB . But the file is not rolling after the size has reached to 1 KB .
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<RollingFile name="Test" fileName="/tmp/Test.log"
filePattern="logs/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH-mm}-%i.log.gz">
<PatternLayout>
<Pattern>%d|%m%n</Pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="1 KB"/>
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Test"/>
</Root>
</Loggers>
</Configuration>
--
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