[
https://issues.apache.org/jira/browse/LOG4J2-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335766#comment-15335766
]
Remko Popma edited comment on LOG4J2-1435 at 6/17/16 10:09 AM:
---------------------------------------------------------------
Log4j 2 is a complete rewrite and works differently than Log4j 1.x.
My suggestions:
* Option 1: Separate log files. Let each EAR have separate and different
log4j2.xml configurations and ensure that each EAR logs to separate log files.
This is easiest.
* Option 2: Share log files. I think it is possible to let multiple EARs to
write to the same log file. Remove the log4j jars from all EARs/WARs and put
them in the WebLogic shared lib directory. I'm not sure if the log4j2.xml
configurations can be inside the EAR or if you need to have a single log4j2.xml
configuration file and place it in the WebLogic shared lib directory.
Please spend some time reading the fine manual on Log4j 2 Logging Separation:
https://logging.apache.org/log4j/2.x/manual/logsep.html
If you have trouble getting these to work, please switch on Log4j internal
status logging by adding {{<Configuration status="trace" ...}} to the beginning
of your configuration file(s). This will show Log4j internal logging on the
console, including startup information and rollover details. Then provide these
details in a Jira comment to help us understand what is happening.
was (Author: [email protected]):
Log4j 2 is a complete rewrite and works differently than Log4j 1.x.
My suggestions:
* Option 1: Separate log files. Let each EAR have separate and different
log4j2.xml configurations and ensure that each EAR logs to separate log files.
This is easiest.
* Option 2: Share log files. I think it is possible to let multiple EARs to
write to the same log file. Remove the log4j jars from all EARs/WARs and put
them in the WebLogic shared lib directory. I'm not sure if the log4j2.xml
configurations can be inside the EAR or if you need to have a single log4j2.xml
configuration file and place it in the WebLogic shared lib directory.
If you have trouble getting these to work, please switch on Log4j internal
status logging by adding {{<Configuration status="trace" ...}} to the beginning
of your configuration file(s). This will show Log4j internal logging on the
console, including startup information and rollover details. Then provide these
details in a Jira comment to help us understand what is happening.
> Log4j2 writing logs to already rolled file
> ------------------------------------------
>
> Key: LOG4J2-1435
> URL: https://issues.apache.org/jira/browse/LOG4J2-1435
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators, Performance Benchmarks
> Affects Versions: 2.6.1
> Environment: OS : Linux
> Weblogic: 10.3.6.0
> JDK: 1.7.0_55
> Reporter: Prashant
> Priority: Critical
> Attachments: Capture.PNG, Capture2.PNG, log4j.xml
>
>
> Recently we have migrated from log4j 1.x to 2.6.1
> I am seeing loggers are being written to rolled file along with main log file.
> This is observed mainly if I am pushing load of 400k records.
> PFA log4j xml.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]