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

Remko Popma updated LOG4J2-765:
-------------------------------

    Summary: Feature request: log warning to console if default configuration 
is used when missing log4j-core  (was: Feature request: log warning to console 
if default configuration is used)

LogManager already emits a warning if no implementation of the Log4j2 API can 
be found. I will use this Jira ticket to improve that warning message, and use 
LOG4J2-729 for the warning message when no configuration file is found.

> Feature request: log warning to console if default configuration is used when 
> missing log4j-core
> ------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-765
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-765
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: API, Configurators, Core
>    Affects Versions: 2.0, 2.0.1
>            Reporter: Remko Popma
>
> To summarize a recent twitter conversation: 
> a user became very frustrated that Log4j2 did not log to the configured file, 
> and gave up and moved on to JUL instead.
> After some questions it turned out that (probably) the problem was that they 
> had log4j-api but not log4j-core in the classpath.
> We can dismiss this saying that users should read the documentation better, 
> but users are in a hurry to get things done and I can easily see this 
> happening to more people.
> In the above conversation, the user pointed out that very likely, if someone 
> ends up with the default configuration (log ERROR level messages to the 
> console), they made a mistake. 
> The feature request is that log4j should help users by printing a message to 
> the console that explains why the user ended up with the default 
> configuration. 
> * In case log4j-core not in the classpath: {{Log4j2 could not find a logging 
> implementation. Please add log4j-core to the classpath. Using SimpleLogger to 
> log to the console...}}
> * In case no config file was found: {{No log4j2 configuration file found. 
> Using default configuration: errors to the console.}}
> This last case is actually a frequent cause of questions on StackOverflow.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to