logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-765) Feature request: log warning to console if default configuration is used
Date Mon, 04 Aug 2014 11:49:11 GMT

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

Gary Gregory commented on LOG4J2-765:

We could also provide an all-in-one jar and/or a api+core jar.

> Feature request: log warning to console if default configuration is used
> ------------------------------------------------------------------------
>                 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

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

View raw message