log4j要更改日志级别,我应该更改根级别还是配置状态?

时间:2015-07-08 16:57:09

标签: java logging log4j

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG"> <!--status="DEBUG" - should I change this??--> 

 <Appenders>
  <Console name="Console" target="SYSTEM_OUT">
   <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
  </Console>
 </Appenders>

 <Loggers>
  <Root level="error"> <!--status="DEBUG" - should I change this??--> 
   <AppenderRef ref="Console"/>
  </Root>
 </Loggers>

log4j更改日志记录级别,我应该更改根级别还是配置状态?

0 个答案:

没有答案