Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4.1
-
None
Description
<SizeBasedTriggeringPolicy size="20 MB"/>
Below configuration does not work properly on tomcat-6. For 20 MB log file, after tomcat server restart on first run, it work fine and archive files but on other turns, it does not archive log file even it is bigger than 20MB.
<SizeBasedTriggeringPolicy size="10 KB"/>
if you configure as 10 KB, it works fine.
<?xml version="1.0" encoding="UTF-8"?> <Configuration name="UrbanCode"> <Properties> <Property name="path">C:/Log</Property> <Property name="filename">UrbanCode</Property> </Properties> <Appenders> <RollingFile name="RollingFile" fileName="C:/Log/UrbanCode.log" filePattern="C:/Log/UrbanCode-%d{ddMMyyyy-HHmmss}.log.zip"> <PatternLayout> <Pattern>%d{yyyy-MM-dd}\t%d{HH:mm:ss}\t%-5level\t%class{36}\t%L\t%M\t%msg%xEx%n</Pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="20 MB"/> </Policies> <DefaultRolloverStrategy max="10"/> </RollingFile> <Console name="Console" target="SYSTEM_OUT" ignoreExceptions="false"> <PatternLayout pattern="%M\t%msg%xEx%n"/> </Console> </Appenders> <Loggers> <Root level="Trace"> <AppenderRef ref="RollingFile"/> <AppenderRef ref="Console"/> </Root> </Loggers> </Configuration>