[
https://issues.apache.org/jira/browse/LOG4J2-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237732#comment-15237732
]
Ralph Goers commented on LOG4J2-1266:
-------------------------------------
>From your description it is working exactly as I would expect. The EJB and web
>application are using different FileManagers so one of them determines it is
>time to roll over and starts the process of doing that. Shortly after the
>other determines it should roll over and writes over the files being
>manipulated by the first. This is why the RollingFileAppender doesn't support
>file locking - it can't be used safely by two applications.
You have a couple of choices:
1. Have both applications write to something common, like a flume agent, that
then writes the data to a log file.
2. Have the web component and ejb write to different files.
> at midnight Log4j2 continue loging the the rolled file and overwrite
> yesterday logs
> -----------------------------------------------------------------------------------
>
> Key: LOG4J2-1266
> URL: https://issues.apache.org/jira/browse/LOG4J2-1266
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.4
> Environment: Jboss, Java 1.7
> Reporter: Hassan morsy
>
> the problem is the log at midnight renamed with the date and the index. just
> before the file got compre ssed it got overwritten. with the new days logs
> for few seconds. I endup by very short compress file and lose the yesterday
> logs.
> when I start gz the file it stoped writing to the file.
> when I used %1 it did create create two files app-date-2-.log.gz the worthe
> few seconds of log after 12:00 and app-date-1.log.gz yesterday logs
> if I don't gz the file it continue writing to both file app.log and
> app-date.log
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]