[jboss-dev-forums] [JBoss OSGi Development] - JBoss OSGi logging policy

thomas.diesler@jboss.com do-not-reply at jboss.com
Sat Nov 7 18:20:22 EST 2009


Logging in JBoss OSGi is done through multiple logging frameworks. There are bundles that use commons-logging, slf4j and of course jboss-logging. Ultimately all logging is routed to log4j.

For surefire tests this is the same. 

Every (reactor) module contains a log4j configuration in 


  | src/test/resources/log4j.xml
  |  

All surefire tests MUST write their their test log to 


  | target/test.log
  |  

This file is processed by hudson jobs after the surefire test run.

The log4.xml files contain these settings


  |   <appender name="FILE" class="org.apache.log4j.FileAppender">
  |     <param name="File" value="${log4j.output.dir}/test.log"/>
  |      ...
  |   </appender>
  | 
  |   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
  |     <param name="Target" value="System.out" />
  |     <param name="Threshold" value="INFO" />
  |     ...
  |   </appender>
  | 
  |   <root>
  |     <!--appender-ref ref="CONSOLE"/-->
  |     <appender-ref ref="FILE"/>
  |   </root>
  | 

There are many projects under the JBoss OSGi umbrella. For log file consistency and meaningful hudson console output, please respect this policy and do not change the log configuration light heartedly.

cheers

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264426#4264426

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264426



More information about the jboss-dev-forums mailing list