You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/09/07 04:14:00 UTC

[jira] [Commented] (LOG4J2-3572) LoggerConfig could provide the information if level is explicitly set or inherited

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

ASF subversion and git services commented on LOG4J2-3572:
---------------------------------------------------------

Commit 0218b1bc4fca14a54c2db0676d42ba701aab1d51 in logging-log4j2's branch refs/heads/master from Ralph Goers
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=0218b1bc4f ]

LOG4J2-3572 - Add getExlicitLevel method to LoggerConfig


> LoggerConfig could provide the information if level is explicitly set or inherited
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3572
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3572
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.18.0
>            Reporter: Attila Varga
>            Priority: Minor
>
> When _org.apache.logging.log4j.core.config.LoggerConfig.level_ is set to _null_ the logging level is inherited from the parent:
> {code:java}
> public Level getLevel() {
>   return level == null ? parent == null ? Level.ERROR : parent.getLevel() : level;
> } 
> {code}
> It would be useful to know if level is explicitly set or inherited.
> Something like: {_}hasLevel(){_}, {_}isLevelSet(){_}, {_}isLevelInherited(){_}, or something that fits into Log4j terminology.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)