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

Carter Kozak commented on LOG4J2-2663:
--------------------------------------

Yaml considers off the same as the boolean value false. This will work if “off” 
is quoted.
See https://yaml.org/type/bool.html

> 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)

Reply via email to