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

Ralph Goers commented on LOG4J2-3611:
-------------------------------------

Looking at wha you wrote on Oct 5 again it sounds like Log4j is using the 
console appender which writes to system.out. JBoss is then getting that and 
turning it into its own log events. If that is the case then you should either 
a) use a PatternLayout that only specifies %m, or b) NOT use the console 
appender.

Based on your description I am going to mark this as resolved because it sounds 
like you are really using JBoss for all your logging, not Log4j.

> 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)

Reply via email to