ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

Java基础学习总结(179)——Java 日志框架冲突解决方案大汇总

2021-04-08 11:00:28  阅读:15  来源: 互联网

标签:Java jar SLF4J slf4j 179 org 日志 logback log4j


前言

你是否遇到过配置了日志,但打印不出来的情况?你是否遇到过配置了logback,启动时却提示log4j错误的情况?像下面这样:

log4j:WARN No appenders could be found for logger (org.example.App).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

你是否遇到过SLF4J的这种报错?

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/jiang/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/jiang/.m2/repository/org/slf4j/slf4j-log4j12/1.7.30/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]

你是否遇到过DUBBO日志打印不正常的情况?

标签:Java,jar,SLF4J,slf4j,179,org,日志,logback,log4j
来源: https://blog.csdn.net/u012562943/article/details/115509236

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有