首页 > 解决方案 > Spring Application - 正在使用哪个日志框架?

问题描述

我有一个继承的 Spring 应用程序。

该应用程序包含一些 log4j.properties 文件,但这些文件显然没有被使用,因为更改这些文件对日志输出没有影响。内容很琐碎,所以我删除了它们(放心,我们有 VCS)。

java类似乎都使用slf4j“Logger”接口,但我知道slf4j只是一个调用日志框架的门面。

我想配置日志框架,但我不知道正在使用哪一个,因此通过在不同位置创建不同的配置文件进行试验并没有让我走得太远。

如何确定此应用程序正在使用哪个日志记录框架?

如何确定实际使用的日志框架?有一个 pom.xml 导入 spring mvc 但不导入 spring boot。

如果没有获得 Spring Boot 入门指南,几乎不可能在谷歌上搜索有关登录 Spring 的任何内容,这不是我想要的。

现在 Hibernate 似乎对存在的 logback 配置文件的内容做出响应,但奇怪的是 Spring Boot 的其余日志记录没有。log4j.xml 文件的存在/不存在也没有影响。

依赖列表在这里。请注意,我没有设计这个,谢谢。此外,我习惯于从 intellij 运行 maven 依赖树,但由于某种原因缺少该选项。

org.springframework.boot:spring-boot:2.1.3.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-jcl:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-expression:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-webmvc:5.1.5.RELEASE
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-expression:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-web:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-jdbc:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-tx:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework.security:spring-security-core:3.1.0.RELEASE
aopalliance:aopalliance:1.0
org.springframework:spring-expression:3.0.6.RELEASE
org.springframework:spring-aop:3.0.6.RELEASE
org.springframework:spring-context:3.0.6.RELEASE
org.springframework:spring-beans:3.0.6.RELEASE
org.springframework:spring-core:3.0.6.RELEASE
org.springframework.security:spring-security-crypto:3.1.0.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework.security:spring-security-config:3.1.0.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
aopalliance:aopalliance:1.0
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework.security:spring-security-core:3.1.0.RELEASE
aopalliance:aopalliance:1.0
org.springframework:spring-expression:3.0.6.RELEASE
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:3.0.6.RELEASE
org.springframework.security:spring-security-crypto:3.1.0.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework.security:spring-security-taglibs:3.1.0.RELEASE
org.springframework.security:spring-security-web:3.1.0.RELEASE
org.springframework:spring-tx:3.0.6.RELEASE
org.springframework:spring-web:3.0.6.RELEASE
aopalliance:aopalliance:1.0
org.springframework:spring-expression:5.1.5.RELEASE
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework.security:spring-security-core:3.1.0.RELEASE
org.springframework:spring-jdbc:3.0.6.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework.security:spring-security-acl:3.1.0.RELEASE
org.springframework:spring-tx:5.1.5.RELEASE
aopalliance:aopalliance:1.0
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework.security:spring-security-core:3.1.0.RELEASE
org.springframework:spring-jdbc:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-web:5.1.5.RELEASE
org.springframework:spring-expression:5.1.5.RELEASE
org.springframework:spring-aop:5.1.5.RELEASE
org.springframework.security:spring-security-core:3.1.0.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
org.springframework:spring-context-support:5.1.5.RELEASE
org.springframework:spring-beans:5.1.5.RELEASE
org.springframework:spring-context:5.1.5.RELEASE
org.springframework:spring-core:5.1.5.RELEASE
javax.persistence:persistence-api:1.0.2
org.aspectj:aspectjrt:1.6.10
javax.inject:javax.inject:1
javax.servlet:servlet-api:2.5
javax.servlet.jsp:jsp-api:2.1
javax.servlet:jstl:1.2
javax.validation:validation-api:1.1.0.Final
org.hibernate:hibernate-validator:5.0.1.Final
javax.validation:validation-api:1.1.0.Final
org.jboss.logging:jboss-logging:3.1.1.GA
com.fasterxml:classmate:0.8.0
org.sitemesh:sitemesh:3.0.0
net.sourceforge.jtds:jtds:1.3.1
commons-dbcp:commons-dbcp:1.4
commons-pool:commons-pool:1.5.4
javax.mail:mail:1.4
javax.activation:activation:1.1
org.codehaus.jackson:jackson-mapper-asl:1.9.10
org.codehaus.jackson:jackson-core-asl:1.9.10
commons-lang:commons-lang:2.6
microsoft:reportingservices:1.0
org.apache.axis:axis:1.4
commons-io:commons-io:2.4
commons-discovery:commons-discovery:0.5
commons-logging:commons-logging:1.1.1
javax.xml:jaxrpc-api:1.1
axis:axis-wsdl4j:1.5.1
com.fasterxml.jackson.core:jackson-databind:2.9.7
com.fasterxml.jackson.core:jackson-annotations:2.9.0
com.fasterxml.jackson.core:jackson-core:2.9.7
com.fasterxml.jackson.core:jackson-core:2.9.7
com.fasterxml.jackson.core:jackson-annotations:2.9.7
org.apache.httpcomponents:httpclient:4.5.6
org.apache.httpcomponents:httpcore:4.4.10
commons-logging:commons-logging:1.2
commons-codec:commons-codec:1.10
junit:junit:4.7

标签: springloggingslf4j

解决方案


推荐阅读