logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhinav Shah (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-394) ClassLoaderContextSelector logging WARN messages
Date Thu, 05 Sep 2013 16:50:54 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Abhinav Shah updated LOG4J2-394:
--------------------------------

    Description: 
I am getting the following WARN message everytime my application logs something.

{color:red}
WARN locateContext called with URI null. Existing LoggerContext has URI classpath:log4j/local.log4j.xml
{color}

I traced this to ClassLoaderContextSelector - 
{code}
if (ctx != null) {
            if (ctx.getConfigLocation() == null && configLocation != null) {
                LOGGER.debug("Setting configuration to {}", configLocation);
                ctx.setConfigLocation(configLocation);
            } else if (ctx.getConfigLocation() != null && !ctx.getConfigLocation().equals(configLocation))
{
                LOGGER.warn("locateContext called with URI {}. Existing LoggerContext has
URI {}", configLocation,
                    ctx.getConfigLocation());
            }
            return ctx;
        }
{code}

[~ralph_goers@dslextreme.com] [~ralph.goers@dslextreme.com] Why are we logging these WARN
messages?

  was:
I am getting the following WARN message everytime my application logs something.

{color:red}
WARN locateContext called with URI null. Existing LoggerContext has URI classpath:log4j/local.log4j.xml
{color}

I traced this to ClassLoaderContextSelector - 
{code}
if (ctx != null) {
            if (ctx.getConfigLocation() == null && configLocation != null) {
                LOGGER.debug("Setting configuration to {}", configLocation);
                ctx.setConfigLocation(configLocation);
            } else if (ctx.getConfigLocation() != null && !ctx.getConfigLocation().equals(configLocation))
{
                LOGGER.warn("locateContext called with URI {}. Existing LoggerContext has
URI {}", configLocation,
                    ctx.getConfigLocation());
            }
            return ctx;
        }
{code}

    
> ClassLoaderContextSelector logging WARN messages
> ------------------------------------------------
>
>                 Key: LOG4J2-394
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-394
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.0-beta9
>            Reporter: Abhinav Shah
>
> I am getting the following WARN message everytime my application logs something.
> {color:red}
> WARN locateContext called with URI null. Existing LoggerContext has URI classpath:log4j/local.log4j.xml
> {color}
> I traced this to ClassLoaderContextSelector - 
> {code}
> if (ctx != null) {
>             if (ctx.getConfigLocation() == null && configLocation != null) {
>                 LOGGER.debug("Setting configuration to {}", configLocation);
>                 ctx.setConfigLocation(configLocation);
>             } else if (ctx.getConfigLocation() != null && !ctx.getConfigLocation().equals(configLocation))
{
>                 LOGGER.warn("locateContext called with URI {}. Existing LoggerContext
has URI {}", configLocation,
>                     ctx.getConfigLocation());
>             }
>             return ctx;
>         }
> {code}
> [~ralph_goers@dslextreme.com] [~ralph.goers@dslextreme.com] Why are we logging these
WARN messages?

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


Mime
View raw message