項目部署在linux服務器中,不輸出log日誌文件

最近在部署項目(linux系統)的時候發現一個問題,log日誌不輸出,又不報錯,可是在本地開發環境(windows 7)可輸出,後來網上搜了一下,原來是報了jar包衝突的錯誤。html

下面這段就是報錯的日誌,其中logback-classic-1.1.2.jar和activemq-all-5.14.0.jar衝突:linux

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/dev/m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/dev/m2/repository/org/apache/activemq/activemq-all/5.14.0/activemq-all-5.14.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

因此就針對ActiveMQ和logback日誌衝突的問題,找到了答案,原來是activemq-all的問題,so就改一下activemq須要引用的jar包吧!!apache

windows

<dependency>  
   <groupId>org.apache.activemq</groupId>  
   <artifactId>activemq-pool</artifactId>  
   <version>5.14.0</version>  
</dependency>  
<dependency>  
   <groupId>org.apache.activemq</groupId>
   <artifactId>activemq-all</artifactId>  
   <version>5.14.0</version>  
</dependency>

改成服務器

<dependency>  
   <groupId>org.apache.activemq</groupId>  
   <artifactId>activemq-pool</artifactId>  
   <version>5.7.0</version>  
</dependency>  
<dependency>  
   <groupId>org.apache.activemq</groupId>
   <artifactId>activemq-core</artifactId>  
   <version>5.7.0</version>  
</dependency>

改好後啓動,錯誤沒有了,將jar部署到服務器上,啓動項目,日誌終於出現啦!學習

今天又學習了!.net

參考:https://blog.csdn.net/carychengzubin/article/details/53326158日誌

相關文章
相關標籤/搜索