dingli (JIRA)
2014-07-31 07:01:52 UTC
dingli created LOG4J2-755:
-----------------------------
Summary: Log File not rollover in windows tomcat
Key: LOG4J2-755
URL: https://issues.apache.org/jira/browse/LOG4J2-755
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.0
Environment: Windows 7, JDK 1.6, tomcat 7.0.55
Reporter: dingli
<RollingFile name="MyFile" filename="${web:rootDir}/WEB-INF/log/sample.log" filePattern="${web:rootDir}/WEB-INF/log/sample.log.%d{yyyy-MM-dd}">
<PatternLayout pattern="[%d{yyyy-MM-dd HH:mm:ss.SSS}] %t %p %c - %m%n"/>
<TimeBasedTriggeringPolicy />
</RollingFile>
the log file can be created, but can't be rollover next day
the same config works fine in Linux
in log4j2 trace:
2014-07-31 23:30:34,189 TRACE PatternProcessor.getNextTime returning 2014/08/01-00:00:00.000, nextFileTime=2014/07/31-00:00:00.000, prevFileTime=2014/07/30-00:00:00.000, current=2014/07/31-23:30:34.188, freq=DAILY
2014-07-31 23:30:34,194 TRACE DefaultRolloverStrategy.purge() took 0.002823926 seconds
2014-07-31 23:30:34,223 DEBUG RollingFileManager executing synchronous FileRenameAction[D:\java\tomcat7\webapps\sample\WEB-INF\log\sample.log to D:java omcat7webappssample\WEB-INF\log\sample.log.2014-07-30, renameEmptyFiles=false]
2014-07-31 23:30:34,228 ERROR Unable to create directory D:\java\tomcat7\bin\java omcat7webappssample\WEB-INF\log
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
-----------------------------
Summary: Log File not rollover in windows tomcat
Key: LOG4J2-755
URL: https://issues.apache.org/jira/browse/LOG4J2-755
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.0
Environment: Windows 7, JDK 1.6, tomcat 7.0.55
Reporter: dingli
<RollingFile name="MyFile" filename="${web:rootDir}/WEB-INF/log/sample.log" filePattern="${web:rootDir}/WEB-INF/log/sample.log.%d{yyyy-MM-dd}">
<PatternLayout pattern="[%d{yyyy-MM-dd HH:mm:ss.SSS}] %t %p %c - %m%n"/>
<TimeBasedTriggeringPolicy />
</RollingFile>
the log file can be created, but can't be rollover next day
the same config works fine in Linux
in log4j2 trace:
2014-07-31 23:30:34,189 TRACE PatternProcessor.getNextTime returning 2014/08/01-00:00:00.000, nextFileTime=2014/07/31-00:00:00.000, prevFileTime=2014/07/30-00:00:00.000, current=2014/07/31-23:30:34.188, freq=DAILY
2014-07-31 23:30:34,194 TRACE DefaultRolloverStrategy.purge() took 0.002823926 seconds
2014-07-31 23:30:34,223 DEBUG RollingFileManager executing synchronous FileRenameAction[D:\java\tomcat7\webapps\sample\WEB-INF\log\sample.log to D:java omcat7webappssample\WEB-INF\log\sample.log.2014-07-30, renameEmptyFiles=false]
2014-07-31 23:30:34,228 ERROR Unable to create directory D:\java\tomcat7\bin\java omcat7webappssample\WEB-INF\log
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.2#6252)