Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
2.17.2
-
None
-
None
Description
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