You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Poorna Subhash P (JIRA)" <ji...@apache.org> on 2013/09/20 11:45:51 UTC
[jira] [Updated] (LOG4J2-405) Log4jConfigListener is starting
LoggerContext twice
[ https://issues.apache.org/jira/browse/LOG4J2-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Poorna Subhash P updated LOG4J2-405:
------------------------------------
Attachment: log4j2.0-test.zip
log4j2.0.log
Attached the simple stripped down version of maven web project which just initialized log4j. No other external dependencies.
Running it in Tomcat 7.0.42 and removed log4j*.jar from catalina.properties, property tomcat.util.scan.DefaultJarScanner.jarsToSkip.
Attached is the log on server startup.
See line 27 --> Reconfiguration Completed. And then the whole process repeated.
I have reconfirmed the execution traces mentioned earlier.
> Log4jConfigListener is starting LoggerContext twice
> ---------------------------------------------------
>
> Key: LOG4J2-405
> URL: https://issues.apache.org/jira/browse/LOG4J2-405
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.0-beta9
> Reporter: Poorna Subhash P
> Priority: Minor
> Attachments: log4j2.0.log, log4j2.0-test.zip
>
>
> While debugging my log4j2.0 configuration in web application, I have observed that the LoggerContext.start() is called twice once without parameter and next with Configuration parameters.
> Following are stack paths to these calls.
> 1st path:
> LoggerContext.start() line: 145
> Log4jContextFactory.getContext(String, ClassLoader, boolean, URI) line: 104
> Log4jContextFactory.getContext(String, ClassLoader, boolean, URI) line: 34
> LogManager.getContext(ClassLoader, boolean, URI) line: 187
> Configurator.initialize(String, ClassLoader, URI, Object) line: 103
> Configurator.initialize(String, ClassLoader, String, Object) line: 63
> Log4jWebInitializerImpl.initializeNonJndi(String) line: 136
> Log4jWebInitializerImpl.initialize() line: 82
> 2nd Path:
> LoggerContext.start(Configuration) line: 175
> Configurator.initialize(String, ClassLoader, URI, Object) line: 111
> Configurator.initialize(String, ClassLoader, String, Object) line: 63
> Log4jWebInitializerImpl.initializeNonJndi(String) line: 136
> Log4jWebInitializerImpl.initialize() line: 82
> During first path, it is basically calling reconfigure.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org