You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Geng Yuanzhe (Jira)" <ji...@apache.org> on 2020/09/25 14:13:00 UTC
[jira] [Commented] (LOG4J2-2933) Configurator.setAllLevels throws
when using log4j-to-slf4j
[ https://issues.apache.org/jira/browse/LOG4J2-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202195#comment-17202195 ]
Geng Yuanzhe commented on LOG4J2-2933:
--------------------------------------
In log4j2, the log4j-to-slf4j.jar along with the actual slf4j impl (such as logback-classic) is equivalent to log4j-core.jar. They are both the implements of log4j-api. So as user, you can't modify the level of log4j-to-slf4j with method in log4j-core.
> Configurator.setAllLevels throws when using log4j-to-slf4j
> ----------------------------------------------------------
>
> Key: LOG4J2-2933
> URL: https://issues.apache.org/jira/browse/LOG4J2-2933
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.13.3
> Reporter: Brian Harris
> Priority: Major
>
> When using SLF4J bridge (log4j-to-slf4j-2.0.jar) then calling Configurator.setAllLevels throws a ClassCastException because a SLF4JLoggerContext is returned. Being in the core jar I assumed this should work whether or not using the bridge, but I may be wrong.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)