Discussion:
[jira] [Created] (LOG4J2-755) Log File not rollover in windows tomcat
dingli (JIRA)
2014-07-31 07:01:52 UTC
Permalink
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)
Remko Popma (JIRA)
2014-09-30 00:36:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remko Popma updated LOG4J2-755:
-------------------------------
Labels: Rollover (was: )
Post by dingli (JIRA)
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
Labels: Rollover
<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
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.3.4#6332)
Stefan Murawski (JIRA)
2014-10-01 08:23:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154558#comment-14154558 ]

Stefan Murawski commented on LOG4J2-755:
----------------------------------------

the same happens for me
{code}
2014-10-01 10:13:51,021 DEBUG Using default SystemClock for timestamps
2014-10-01 10:13:56,917 TRACE DefaultRolloverStrategy.purge() took 0.001169143 seconds
2014-10-01 10:13:56,919 DEBUG RollingFileManager executing synchronous FileRenameAction[C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql.log to C:Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql-10-01-2014-15-1.log, renameEmptyFiles=false]
2014-10-01 10:13:56,919 ERROR Unable to create directory C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\bin\Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs
{code}
Post by dingli (JIRA)
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
Labels: Rollover
<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
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.3.4#6332)
Stefan Murawski (JIRA)
2014-10-01 08:24:34 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154558#comment-14154558 ]

Stefan Murawski edited comment on LOG4J2-755 at 10/1/14 8:24 AM:
-----------------------------------------------------------------

the same happens for me in 2.0.2
{code}
2014-10-01 10:13:51,021 DEBUG Using default SystemClock for timestamps
2014-10-01 10:13:56,917 TRACE DefaultRolloverStrategy.purge() took 0.001169143 seconds
2014-10-01 10:13:56,919 DEBUG RollingFileManager executing synchronous FileRenameAction[C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql.log to C:Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql-10-01-2014-15-1.log, renameEmptyFiles=false]
2014-10-01 10:13:56,919 ERROR Unable to create directory C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\bin\Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs
{code}


Configuration:
{code}
<RollingFile name="fileAppender" fileName="${sys:catalina.base}/logs/bms-asfinag-potsdam.log"
filePattern="${sys:catalina.base}/logs/bms-asfinag-potsdam-%d{MM-dd-yyyy-HH}-%i.log.zip">
<ThresholdFilter level="DEBUG" onMatch="ACCEPT"
onMismatch="DENY" />
<PatternLayout pattern="%d{dd.MM.yyyy HH:mm:ss,SSS} %-5p [%c] [%t] %m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="8"
modulate="true" />
<SizeBasedTriggeringPolicy size="250 MB" />
</Policies>
</RollingFile>
{code}


was (Author: oers):
the same happens for me
{code}
2014-10-01 10:13:51,021 DEBUG Using default SystemClock for timestamps
2014-10-01 10:13:56,917 TRACE DefaultRolloverStrategy.purge() took 0.001169143 seconds
2014-10-01 10:13:56,919 DEBUG RollingFileManager executing synchronous FileRenameAction[C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql.log to C:Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql-10-01-2014-15-1.log, renameEmptyFiles=false]
2014-10-01 10:13:56,919 ERROR Unable to create directory C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\bin\Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs
{code}


Configuration:
{code}
<RollingFile name="fileAppender" fileName="${sys:catalina.base}/logs/bms-asfinag-potsdam.log"
filePattern="${sys:catalina.base}/logs/bms-asfinag-potsdam-%d{MM-dd-yyyy-HH}-%i.log.zip">
<ThresholdFilter level="DEBUG" onMatch="ACCEPT"
onMismatch="DENY" />
<PatternLayout pattern="%d{dd.MM.yyyy HH:mm:ss,SSS} %-5p [%c] [%t] %m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="8"
modulate="true" />
<SizeBasedTriggeringPolicy size="250 MB" />
</Policies>
</RollingFile>
{code}
Post by dingli (JIRA)
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
Labels: Rollover
<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
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.3.4#6332)
Stefan Murawski (JIRA)
2014-10-01 08:24:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154558#comment-14154558 ]

Stefan Murawski edited comment on LOG4J2-755 at 10/1/14 8:23 AM:
-----------------------------------------------------------------

the same happens for me
{code}
2014-10-01 10:13:51,021 DEBUG Using default SystemClock for timestamps
2014-10-01 10:13:56,917 TRACE DefaultRolloverStrategy.purge() took 0.001169143 seconds
2014-10-01 10:13:56,919 DEBUG RollingFileManager executing synchronous FileRenameAction[C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql.log to C:Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql-10-01-2014-15-1.log, renameEmptyFiles=false]
2014-10-01 10:13:56,919 ERROR Unable to create directory C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\bin\Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs
{code}


Configuration:
{code}
<RollingFile name="fileAppender" fileName="${sys:catalina.base}/logs/bms-asfinag-potsdam.log"
filePattern="${sys:catalina.base}/logs/bms-asfinag-potsdam-%d{MM-dd-yyyy-HH}-%i.log.zip">
<ThresholdFilter level="DEBUG" onMatch="ACCEPT"
onMismatch="DENY" />
<PatternLayout pattern="%d{dd.MM.yyyy HH:mm:ss,SSS} %-5p [%c] [%t] %m%n" />
<Policies>
<TimeBasedTriggeringPolicy interval="8"
modulate="true" />
<SizeBasedTriggeringPolicy size="250 MB" />
</Policies>
</RollingFile>
{code}


was (Author: oers):
the same happens for me
{code}
2014-10-01 10:13:51,021 DEBUG Using default SystemClock for timestamps
2014-10-01 10:13:56,917 TRACE DefaultRolloverStrategy.purge() took 0.001169143 seconds
2014-10-01 10:13:56,919 DEBUG RollingFileManager executing synchronous FileRenameAction[C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql.log to C:Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs\bms-asfinag-potsdam-sql-10-01-2014-15-1.log, renameEmptyFiles=false]
2014-10-01 10:13:56,919 ERROR Unable to create directory C:\Program Files\apache\tomcat-bms\apache-tomcat-7.0.42\bin\Program Filesapache omcat-bmsapache-tomcat-7.0.42\logs
{code}
Post by dingli (JIRA)
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
Labels: Rollover
<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
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.3.4#6332)
Remko Popma (JIRA)
2014-10-01 08:35:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remko Popma updated LOG4J2-755:
-------------------------------
Description:
{code}
<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>
{code}
the log file can be created, but can't be rollover next day
the same config works fine in Linux

in log4j2 trace:
{code}
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
{code}

it seems the "\" in path be treated as escape char ?


was:
<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 ?
Post by dingli (JIRA)
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
Labels: Rollover
{code}
<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>
{code}
the log file can be created, but can't be rollover next day
the same config works fine in Linux
{code}
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
{code}
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Remko Popma (JIRA)
2014-10-01 08:37:33 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154565#comment-14154565 ]

Remko Popma commented on LOG4J2-755:
------------------------------------

This may be caused by LOG4J2-829, which is fixed in master and will be included in the upcoming 2.1 release.

Can you check if the issue still occurs if you build from master?
Post by dingli (JIRA)
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
Labels: Rollover
{code}
<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>
{code}
the log file can be created, but can't be rollover next day
the same config works fine in Linux
{code}
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
{code}
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Stefan Murawski (JIRA)
2014-10-02 09:43:34 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156276#comment-14156276 ]

Stefan Murawski commented on LOG4J2-755:
----------------------------------------

2.1-Snapshot worked:

{code}
2014-10-02 11:25:10,024 TRACE PatternProcessor.getNextTime returning 2014/10/02-11:32:00.000, nextFileTime=2014/10/02-11:31:00.000, prevFileTime=2014/10/02-11:23:00.000, current=2014/10/02-11:25:10.024, freq=EVERY_MINUTE
2014-10-02 11:25:10,026 TRACE DefaultRolloverStrategy.purge() took 0.001202891 seconds
2014-10-02 11:25:10,026 DEBUG RollingFileManager executing synchronous FileRenameAction[logs\bms-asfinag-test-sql.log to C:\Program Files\Apache Software Foundation\Tomcat7_Dev\logs\archive\bms-asfinag-test-sql-10-02-2014-11-23-1.log, renameEmptyFiles=false]
2014-10-02 11:25:10,028 DEBUG RollingFileManager executing async GzCompressAction[C:\Program Files\Apache Software Foundation\Tomcat7_Dev\logs\archive\bms-asfinag-test-sql-10-02-2014-11-23-1.log to C:\Program Files\Apache Software Foundation\Tomcat7_Dev\logs\archive\bms-asfinag-test-sql-10-02-2014-11-23-1.log.gz, deleteSource=true]
{code}
Post by dingli (JIRA)
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
Labels: Rollover
{code}
<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>
{code}
the log file can be created, but can't be rollover next day
the same config works fine in Linux
{code}
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
{code}
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
Remko Popma (JIRA)
2014-10-02 11:38:34 UTC
Permalink
[ https://issues.apache.org/jira/browse/LOG4J2-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Remko Popma closed LOG4J2-755.
------------------------------
Resolution: Duplicate
Fix Version/s: 2.1

Thanks for the confirmation!
I'll close this issue as a duplicate of LOG4J2-829 then.
Feel free to re-open if necessary.
Post by dingli (JIRA)
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
Labels: Rollover
Fix For: 2.1
{code}
<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>
{code}
the log file can be created, but can't be rollover next day
the same config works fine in Linux
{code}
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
{code}
it seems the "\" in path be treated as escape char ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Loading...