1
我的依赖性看起来像如何在使用Slf4j和logback时禁止jboss日志记录?
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.13</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.14.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.14.Final</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.6.3</version>
</dependency>
,我把它们作为
private static final Logger LOGGER = LoggerFactory.getLogger(StealthWatch.class);
当我使用maven控制台上运行我的申请,我看到
129 [main] DEBUG c.e.boeing.internal.StealthWatch - Stealthwatch with url: http://127.0.0.1:8080/stealthwatch/rest/activities, query: <IDSentrieServiceReq><partner_id>StealthWatchPartnerId</partner_id><partner_passcode>StealthWatchPartnerPasscode</partner_passcode><service name="IDSentrieUser" version="1.1"><action id="IPIDActivityGet"><type>delta</type><time_start>2016-01-08T15:28:37.586</time_start><time_end>2016-01-08T15:28:37.642</time_end></action></service></IDSentrieServiceReq>
200 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
201 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002330: Unable to retrieve config: expandEntityReferences defaults to false
201 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002335: Unable to retrieve config: enableSecureProcessingFeature defaults to true
201 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002325: Unable to retrieve config: disableDTDs defaults to true
205 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002330: Unable to retrieve config: expandEntityReferences defaults to false
205 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002335: Unable to retrieve config: enableSecureProcessingFeature defaults to true
205 [main] DEBUG o.j.resteasy.resteasy_jaxrs.i18n - RESTEASY002325: Unable to retrieve config: disableDTDs defaults to true
132 [main] DEBUG c.e.boeing.internal.StealthWatch - Stealthwatch with url: http://127.0.0.1:8080/stealthwatch/rest/activities, query: <IDSentrieServiceReq><partner_id>StealthWatchPartnerId</partner_id><partner_passcode>StealthWatchPartnerPasscode</partner_passcode><service name="IDSentrieUser" version="1.1"><action id="IPIDActivityGet"><type>delta</type><time_start>2016-01-08T15:33:06.022</time_start><time_end>2016-01-08T15:33:06.076</time_end></action></service></IDSentrieServiceReq>
我logback.xml
是
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>ec-dhcp.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>ec-dhcp.log.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="FILE" />
</root>
</configuration>
我该如何摆脱所有org.jboss
日志?
是不是设置org.jboss足够的错误? – Marged
@已收集,我该怎么做? – daydreamer
试试这个:http://stackoverflow.com/questions/11121846/how-to-configure-logback-for-package/ –
Marged