You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/05/03 19:01:00 UTC

[jira] [Commented] (SOLR-16771) "Logging > Level" UI/API does not properly get/update loggers with 'unset' Level

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

ASF subversion and git services commented on SOLR-16771:
--------------------------------------------------------

Commit 0788fb488b78a31347738bbc481041f115f673f0 in solr's branch refs/heads/main from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=0788fb488b7 ]

SOLR-16771: Fixed behavior and handling of 'unset' logging levels in /admin/info/logging API and related Admin UI


> "Logging > Level" UI/API does not properly get/update loggers with 'unset' Level
> --------------------------------------------------------------------------------
>
>                 Key: SOLR-16771
>                 URL: https://issues.apache.org/jira/browse/SOLR-16771
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Chris M. Hostetter
>            Assignee: Chris M. Hostetter
>            Priority: Major
>         Attachments: SOLR-16771.patch
>
>
> If you're using the Solr Admin UI, or the underlying {{/admin/info/logging}} request handler, the option to 'unset' a log level (so the specified logger will inherit the effective level from it's parent) doesn't actually work.
> This is because the underlying {{Log4j2Watcher}} impl is explicitly calling {{LoggerConfig.setLevel(Level.OFF)}} -- meaning it won't log anything regardless of what it's parent logger setting is.
> The correct behavior is to use {{LoggerConfig.setLevel(null)}}
> While looking into this, I realized that the impls of {{Log4j2Watcher.getAllLoggers()}} and {{Log4j2Watcher.Log4j2Info.isSet()}} are also really bizarre and don't make much sense -- making it impossible to tell in the UI which classes *actually* have a 'set' value in the underlying Log4j2 configuration.
> ( Just because a {{LoggerConfig}} exists for a loggerName, doesn't mean it's {{Level}} is "set" -- but the code currently assumes it does. That's the distinction between {{LoggerConfig.getLevel()}} and {{LoggerConfig.getExplicitLevel()}} -- the later may return null.)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org