[jboss-jira] [JBoss JIRA] (LOGMGR-125) Log rotation fails on Windows if target already exists

RH Bugzilla Integration (JIRA) issues at jboss.org
Fri Oct 30 06:42:00 EDT 2015


    [ https://issues.jboss.org/browse/LOGMGR-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123702#comment-13123702 ] 

RH Bugzilla Integration commented on LOGMGR-125:
------------------------------------------------

Panagiotis Sotiropoulos <psotirop at redhat.com> changed the Status of [bug 1274572|https://bugzilla.redhat.com/show_bug.cgi?id=1274572] from NEW to ASSIGNED

> Log rotation fails on Windows if target already exists
> ------------------------------------------------------
>
>                 Key: LOGMGR-125
>                 URL: https://issues.jboss.org/browse/LOGMGR-125
>             Project: JBoss Log Manager
>          Issue Type: Bug
>            Reporter: James Livingston
>            Assignee: James Perkins
>             Fix For: 2.0.4.Final, 2.1.0.Beta1
>
>
> PeriodicRotatingFileHandler (and others) use File.renameTo() to rename the file. That method is documented as having many implementation-defined aspects, see http://docs.oracle.com/javase/7/docs/api/java/io/File.html#renameTo%28java.io.File%29
> One that can be a problem is that on Windows, it will fail if the target file already exists. If you use a ".dd" suffix, this will occur when it rolls over to a new month. It has rarely been a problem, since most people use the year month and day so they are unique. Files.move() can replace existing files, so may be better, and some of the costs of that are likely not to be a problem with how it is using here.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list