You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2022/01/14 18:17:00 UTC

[jira] [Commented] (LOG4J2-3340) StatusLogger's log Level cannot be changed as advertised

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

Michael Vorburger commented on LOG4J2-3340:
-------------------------------------------

https://github.com/vorburger/Learning-Log4j2 is an example project illustrating the issue: Even though it has a {{ log4j2.StatusLogger.properties}} with {{log4j2.StatusLogger.level=WARN}} on the classpath, that does not actually show WARN level logs of StatusLogger, which is pretty confusing. After all, the property IS called StatusLogger.level and not StatusLogger.listeners.level, or something like that.

> StatusLogger's log Level cannot be changed as advertised
> --------------------------------------------------------
>
>                 Key: LOG4J2-3340
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3340
>             Project: Log4j 2
>          Issue Type: Bug
>            Reporter: Michael Vorburger
>            Priority: Major
>             Fix For: 2.17.2
>
>
> I would like to see the warn log from {{LogManager}} re. which implementation it picked, it multiple.
> I would like to be able to do this without a system property but using a properties file on the classpath.
> StatusLogger's JavaDoc (currently) says that "This can be overridden via a system property named #DEFAULT_STATUS_LISTENER_LEVEL and will work with any Log4j provider.", where DEFAULT_STATUS_LISTENER_LEVEL is "log4j2.StatusLogger.level".
> However that currently doesn't seem to quite work as advertised. (If you think it does, please suggest how.) I can see some stuff in StatusLogger related to its default log level been (only?) for StatusListener and StatusData? This seems confusing. 
> I'll raise a PR with a proposed simple fix for this for your review.
> [~ckozak] / [~ggregory]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)