当记录器级别 = DEBUG 时,SLF4J 为 isDebugEnabled() 返回 false

use*_*905 5 log4j slf4j maven

我有一个奇怪的问题。

if (logger.isDebugEnabled()) {  
    logger.debug("Message=\"About to get the application details\" GroupID={}", iGroupID);  
}
Run Code Online (Sandbox Code Playgroud)

我有这个代码,当检查记录器时。的级别logger = DEBUG,但该方法logger.isDebugEnabled()仅返回 false。

我正在使用 SLF4J 和 Maven 添加依赖项。