[ https://issues.apache.org/jira/browse/LOG4J2-1435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334996#comment-15334996 ]
Remko Popma edited comment on LOG4J2-1435 at 6/17/16 12:19 AM: --------------------------------------------------------------- I suspect you were benefitting from a bug in Log4j-1. Log4j 2 does a lot of work to ensure that web applications can have separate log configurations without getting in each other's way. The log4j configuration in one web app is not aware of any other log4j configurations. This gives unpredictable results if there are multiple web apps logging to the same file. It sounds like you want to share a log configuration between multiple web apps. Can you try removing the the log4j jars from all EARs/WARs and putting them in the web container shared lib directory? That way Log4j 2 classes will be loaded by the web container classloader so rollover can be handled in a single place. was (Author: rem...@yahoo.com): I suspect you were benefitting from a bug in Log4j-1. Log4j 2 does a lot of work to ensure that web applications can have separate log configurations without getting in each other's way. The log4j configuration in one web app is not aware of any other log4j configurations. This gives unpredictable results if there are multiple web apps logging to the same file. If that is not what you want (and it sounds like you want to share a log configuration between multiple web apps) then you can try putting the log4j jars and the log4j configuration in the web container shared lib directory. > 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: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org