[
https://issues.apache.org/jira/browse/LOG4J2-3611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613323#comment-17613323
]
Ralph Goers commented on LOG4J2-3611:
-------------------------------------
If you are getting different results for JBoss vs your application then most
likely you have two copies of Log4j present. JBoss will require that Log4j be
in its class path. Your application cannot also have the Log4j jars or you will
still end up with two LoggerContexts since you have two instances of the
BasicContextSelector class present.
> Log4j2 Writing to the rolled file
> ---------------------------------
>
> Key: LOG4J2-3611
> URL: https://issues.apache.org/jira/browse/LOG4J2-3611
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders, Configuration, Web/Servlet
> Affects Versions: 2.17.2
> Reporter: Xin Lin
> Priority: Major
>
> I am migrating log4j 1 to log4j2 in a jboss application.
> I added log4j-api & log4j-core & log4j-1.2-api dependencies, I have added
> log4j2.xml and setup proper system config, and then application good to
> start.
> This issue happens when the rolling action triggerred. When the rolled file
> created, I see that some logs written in the new log file, but some logged in
> the rolled file.
> I turned on the TRACE mode, and can see some logs show that Log4j2
> RollingFileManager execute the FileRenameAction. So we have two files
> (app.log & app.log.2022-09-27).
> But some log events went to app.log, some went to app.log.2022-09-27.
> According to the log format, I think the new logs in rolled file is written
> by Log4j2, the log content is like following:
> 05:01:23,150 INFO [stdout] (Log4j2-AsyncAppenderEventDispatcher-2-ASYNC)
> 05:01:23,136 ERROR [xxx.xxx] xxxxxxxxxxxxxxxxxxxx
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)