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

Ralph Goers commented on LOG4J2-3397:
-------------------------------------

So you have multiple webapps running in the same servlet container all trying 
to write to the same rolling file appender. This is not supported.

Both webapps are going to try to rollover the file since they both have 
triggering policies. So when the first webapp rolls the file the second one 
will then roll the "new" file and may overwrite the first file that rolled. 
Because the file was renamed the webapp that rolled first will continue to 
write to its file - which has now been renamed by the second rollover.

In short, multiple webapps cannot share log files in this way.

> Log4j2 writing logs to already rolled file when deployed multiple wars on 
> jboss
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3397
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3397
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.17.1, 2.17.0
>         Environment: JBOSS-EAP -7.3
> LOG4j 2.17.1
>            Reporter: Bindra Bambharoliya
>            Priority: Major
>
> h4. Log4j2 writing logs to already rolled file When deployed mutiple wars on 
> jboss and all war using same file to write the logs.  
> h4. We have configured log4j2.xml in standalone.xml file for central looging 
> system for entire application. BUt then Log4j2 writing logs to already rolled 
> file.
> Kindly help on configuration or how to use it with JBOSS central logging



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to