logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1813) Provide shorter and more intuitive way to switch on Log4j internal debug logging
Date Mon, 13 Feb 2017 00:13:41 GMT

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

Remko Popma commented on LOG4J2-1813:

That is certainly an improvement and I like the initiative. 

I would like to give the {{-Dlog4j2.debug}} switch special treatment: note that no value is
required, just specifying the property is the equivalent of {{-Dlog4j2.simplelog.StatusLogger.level=TRACE}},
plus it should persist even if the configuration file has a different value in its {{status}}

> Provide shorter and more intuitive way to switch on Log4j internal debug logging
> --------------------------------------------------------------------------------
>                 Key: LOG4J2-1813
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1813
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Configurators
>    Affects Versions: 2.8
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.8.1
> People find it difficult to troubleshoot Log4j 2 configuration issues. Many people don't
know what the "status" attribute is for at the beginning of the configuration:
> {code}
> <Configuration status="warn"> ...
> {code}
> In addition, the above setting does not take effect until the configuration file is found.
If users have trouble making Log4j 2 find their configuration file, the above does not help.
> In such cases, users can enable internal status logging by setting system property {{org.apache.logging.log4j.simplelog.StatusLogger.level}}
to {{TRACE}}.
> This is problematic because:
> * It is not well-known (documented in the FAQ and on the configuration page but many
people don't know about this feature)
> * The name is a bit... lengthy :-) 
> * Apparently people don't intuitively grasp that "status logging" means the internal
log4j 2 debug logging facility.
> * It is confusing that there are two phases (before config file found and after), and
the status logger level can be different and needs to be specified separately
> I propose we add a short, intuitive system property that results in _all_ internal Log4j
2 status logging to be printed to the console. When set, this property should even override
the configuration status attribute in my opinion.
> Something like {{-Dlog4j2.debug}} (without even requiring a value) would be good, but
I'm open to any suggestions.

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