开发者

Specify log level for all log output in log4j for JBoss

开发者 https://www.devze.com 2023-02-26 01:15 出处:网络
I am using JBoss 4.2.3 which uses log4j for its log configuration. I want to somehow specify in the jboss-log4j.xml that I want only log level ERROR and above to be printed in the log file. At the mom

I am using JBoss 4.2.3 which uses log4j for its log configuration. I want to somehow specify in the jboss-log4j.xml that I want only log level ERROR and above to be printed in the log file. At the moment I am specifying this for every package that I use, for example:

   <category name="javax">
      <priority value="ERROR"/>
   </category>

   <category name="org.apache">
      <priority value="ERROR"/>
   </category>

At the end of the file I am specifying

   <root>
      <priority value="ERROR"/>
      <appender-ref ref="CONSOLE"/>
      <appender-ref ref="FILE"/>
   </root>

But I still see DEBUG and INFO level output when I u开发者_运维技巧se new libraries, so I have to specify the level for each package.

Is there a way to specify the default level (ERROR and above) for all packages instead of specifying separately for each package?

Regards


<category name="rootLogger"> 

this might work..

0

精彩评论

暂无评论...
验证码 换一张
取 消