在我们的build.gradle:
dependencies {
// Logging
compile "org.slf4j:slf4j-api:$slf4jVersion"
compile "log4j:log4j:$log4jVersion"
compile "org.slf4j:slf4j-log4j12:$slf4jVersion"
....
}
在代码中,我们使用来自slf4j
库的类。
因此它看起来像这样:
我们也使用Spring框架。它内部使用commons-logging
。我们的配置中没有commons-logging
的排除。但我在日志文件中看到Spring登录。而且我不明白它是如何工作的(我发现它有效)。我们的配置是否正确?
从我的观点来看,我应该添加jcl-over-slf4j
并排除commons-logging
,但我看到现在它正常运行。
情况是否符合预期的行为?