美文网首页
解决LoggerFactory is not a Logback

解决LoggerFactory is not a Logback

作者: SaintKnight | 来源:发表于2019-04-25 14:59 被阅读0次
    ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
    Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.apache.logging.slf4j.Log4jLoggerFactory loaded from file:/Users/JieHuang/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.6.2/log4j-slf4j-impl-2.6.2.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml Object of class [org.apache.logging.slf4j.Log4jLoggerFactory] must be an instance of class ch.qos.logback.classic.LoggerContext
    

    因为引用了log4j2同时还引用了logback

    相关文章

      网友评论

          本文标题:解决LoggerFactory is not a Logback

          本文链接:https://www.haomeiwen.com/subject/mckzgqtx.html