我有一個jar,比如a.jar,我只想在INFO級別啓用日誌記錄。這個jar還依賴於另一個jar,比如說b.jar,它使用Apache HTTP客戶端。當我運行我的應用程序,我看到很多調試輸出的屏幕包括僅在這一格式的Apache HTTP客戶端上的東西,不管是什麼,我把在log4j.properties:無法找到使用中的記錄器配置
[com.amazonaws.AmazonWebServiceClient] : Internal logging successfully configured to commons logger: true Ignored FQCN: org.apache.commons.logging.impl.SLF4JLocationAwareLog
對於生活我,我無法弄清楚罐子的配置來自哪裏。這是我嘗試過的東西。 1.添加一個log4j.properties只a.jar文件的主/資源目錄 2.增加了一個log4j.properties只b.jar的主/資源目錄 3.刪除log4j.properties
請幫我一些輸入日誌配置可能從哪裏獲取。
a.jar文件<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<scope>compile</scope>
</dependency>
這裏的
我這裏還有POM提取物是爲b.jar
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.7</version>
<scope>compile</scope>
</dependency>