[
https://issues.apache.org/jira/browse/LOG4J2-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892238#comment-16892238
]
Som Snytt commented on LOG4J2-2663:
-----------------------------------
This behavior is specified differently for YAML 1.2. ([per
stackoverflow|[https://stackoverflow.com/questions/42283732/are-on-and-off-supposed-to-be-interpreted-as-true-or-false-in-yaml-1-2])]
Maybe this can be clarified in the linked ticket about documentation.
> Can't configure a logger off in yaml
> ------------------------------------
>
> Key: LOG4J2-2663
> URL: https://issues.apache.org/jira/browse/LOG4J2-2663
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.11.1
> Reporter: Som Snytt
> Priority: Major
>
> Yaml config of the form:
> {code:java}
> configuration:
> status: off
> {code}
> results in:
> {noformat}
> 2019-07-23 16:06:15,778 main ERROR Invalid status level specified: false.
> Defaulting to ERROR.{noformat}
> and trying to turn off an ordinary logger:
> {code:java}
> - name: com.acme.noise
> level: off
> additivity: false
> {code}
> results in:
> {noformat}
> 2019-07-23 16:18:29,534 main WARN Error while converting string [false] to
> type [class org.apache.logging.log4j.Level]. Using default value [null].
> java.lang.IllegalArgumentException: Unknown level constant [FALSE].{noformat}
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)