logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1402) org.apache.logging.log4j.core.config.ConfigurationException: No name attribute provided for Logger org
Date Wed, 01 Jun 2016 18:34:59 GMT

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

Ralph Goers commented on LOG4J2-1402:
-------------------------------------

Our properties file support had no relationship to 1.x. The original code that I wrote and
was delivered in 2.5 supported identifiers like what I showed above. We need to restore that.

> org.apache.logging.log4j.core.config.ConfigurationException: No name attribute provided
for Logger org
> ------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1402
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1402
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: JCL Bridge
>    Affects Versions: 2.6
>            Reporter: Pascal Schumacher
>
> After upgrading log4j2 from 2.5 to 2.6 I get the following exception:
> {quote}
> Exception in thread "main" org.apache.logging.log4j.core.config.ConfigurationException:
No name attribute provided for Logger org
> 	at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.createLogger(PropertiesConfigurationBuilder.java:215)
> 	at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.build(PropertiesConfigurationBuilder.java:140)
> 	at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:52)
> 	at org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:34)
> 	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:510)
> 	at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:450)
> 	at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:257)
> 	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:560)
> 	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:577)
> 	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:212)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
> 	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
> 	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:103)
> 	at org.apache.logging.log4j.jcl.LogAdapter.getContext(LogAdapter.java:39)
> 	at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:42)
> 	at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:40)
> 	at org.apache.logging.log4j.jcl.LogFactoryImpl.getInstance(LogFactoryImpl.java:55)
> 	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
> 	at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:159)
> 	at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:223)
> 	at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:88)
> 	at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:58)
> 	at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:61)
> 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136)
> 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
> x.y.z.Start.main(Start.java:12)
> {quote}
> The parameter "key" has the value "org" and the parameter properties has the value {code}{activiti.engine.impl.level=info,
activiti.engine.impl.name=org.activiti.engine.impl}{code}
> The log4j2.properties in use:
> {code}
> # Root logger option
> rootLogger.level = info
> rootLogger.appenderRefs = stdout
> rootLogger.appenderRef.stdout.ref = STDOUT
> # Redirect log messages to console
> appenders = stdout
> appender.stdout.type = Console
> appender.stdout.name = STDOUT
> appender.stdout.layout.type = PatternLayout
> appender.stdout.layout.pattern = %d %-5p [%t] %c - %m%n
> {code}
> Sadly I have not been able to reproduce the issue in a simple standalone application.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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