[
https://issues.apache.org/jira/browse/LOG4J2-3572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601127#comment-17601127
]
Ralph Goers edited comment on LOG4J2-3572 at 9/7/22 4:16 AM:
-------------------------------------------------------------
I have added getExplicitLevel as a method to LoggerConfig. This returns the
LoggerConfig's Level or null. Please verify and close.
was (Author: [email protected]):
I have added getExplicitLevel as a method to LoggerConfig. This returns the
LoggerConfig's Level or null.
> 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
> Fix For: 2.19.0
>
>
> 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)