logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luigi Alice (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-875) Log file getting overwritten on Microsoft Windows Maschines
Date Mon, 11 Jul 2016 10:04:11 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15370489#comment-15370489
] 

Luigi Alice commented on LOG4J2-875:
------------------------------------

Hm, it's a strange behavior.
It's not completely reproducible.


First output was: 
2016-07-11 11:43:21,326 Thread upd/aufg#103  TRACE DefaultRolloverStrategy.purge() took 43.0
milliseconds
2016-07-11 11:43:21,331 Thread upd/aufg#103  DEBUG RollingFileManager executing synchronous
FileRenameAction[c:\TEMP\0865bbe1_persis.log to c:\TEMP\0865bbe1_persis-1.log, renameEmptyFiles=false]
2016-07-11 11:43:21,332 Thread upd/aufg#103  DEBUG RollingFileManager executing async GzCompressAction[c:\TEMP\0865bbe1_persis-1.log
to c:\TEMP\0865bbe1_persis-1.log.gz, deleteSource=true]

But the .gz file was not in the directory. 
I continued working in tomcat and a few minutes later a got this output:

2016-07-11 11:57:40,288 Thread upd/aufg#212  TRACE DefaultRolloverStrategy.purge() took 26.0
milliseconds
2016-07-11 11:57:40,289 Thread upd/aufg#212  DEBUG RollingFileManager executing synchronous
FileRenameAction[c:\TEMP\0865bbe1_persis.log to c:\TEMP\0865bbe1_persis-1.log, renameEmptyFiles=false]
2016-07-11 11:57:40,289 Thread upd/aufg#212  DEBUG RollingFileManager executing async GzCompressAction[c:\TEMP\0865bbe1_persis-1.log
to c:\TEMP\0865bbe1_persis-1.log.gz, deleteSource=true]

And now the file exists!

So I dont know if it's  a real problem. Maybe an async execution problem?






> Log file getting overwritten on Microsoft Windows Maschines
> -----------------------------------------------------------
>
>                 Key: LOG4J2-875
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-875
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0
>         Environment: Java 7, Tomcat 7, Windows Server 2012 R2
>            Reporter: Luigi Alice
>            Priority: Critical
>         Attachments: wrong_path.png
>
>
> A problem with slashes?
> does not work since version 2.0, but in rc1:
> filePattern =    "C:\Server\Webapps\sql2008-test\WEB-INF/log/$\{ctx:remoteDnsName}/$\{ctx:log.uid}_app-%d\{yyyy-MM-dd}-%i.log"
> works:
> filePattern =    "C:/Server/Webapps/sql2008-test/WEB-INF/log/$\{ctx:remoteDnsName}/$\{ctx:log.uid}_app-%d\{yyyy-MM-dd}-%i.log"



--
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


Mime
View raw message