星期二, 八月 12, 2008

JBOSS 4.2.1 打开Log Trace 开关

1.conf/login-config.xml

加入:

<category name="org.jboss.security">
   <priority value="TRACE"/>
</category>
<category name="org.jboss.web.tomcat.security">
   <priority value="TRACE"/>
</category>
<category name="org.apache.catalina">
   <priority value="TRACE"/>
</category>

2.conf/jboss-log4j.xml,修改system.out Logger

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
   <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
   <param name="Target" value="System.out"/>
   <param name="Threshold" value="TRACE"/>

   <layout class="org.apache.log4j.PatternLayout">
      <!-- The default pattern: Date Priority [Category] Message\n -->
      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
   </layout>
</appender>