[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: log multile FILEs appender on JBoss

gan.gary do-not-reply at jboss.com
Sat Jul 26 01:51:08 EDT 2008


"PeterJ" wrote : The logger that the code is getting is not the appender, but rather the category (perhaps it should be Lopgger.getLoggerCategory()).
  | 
  | If you want to log to different log files you must use different categories. Example:
  | 
  | <appender name="A" .../>
  |   | <appender name="B" .../>
  |   | <category name="a">
  |   |   <appender-ref="A"/>
  |   | </category>
  |   | <category name="b">
  |   |   <appender-ref="B"/>
  |   | </category>
  | 
  | Your Java code then looks like:
  | 
  | Logger x = Logger.getLogger("a.wombat");
  | Logger y = Logger.getLogger("b.wombat");
  | 
  | 
different categories ? Can I define my own category? I found these only in "jboss-log4j.xml" :
 <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
  |    <category name="org.apache">
  |       <priority value="INFO"/>
  |    </category>
  | 
  |    <!-- Limit the jacorb category to WARN as its INFO is verbose -->
  |    <category name="jacorb">
  |       <priority value="WARN"/>
  |    </category>
  |    
  |    <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
  |    <category name="org.jgroups">
  |       <priority value="WARN"/>
  |    </category>
  |    
  |    <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
  |    <category name="org.quartz">
  |       <priority value="INFO"/>
  |    </category>

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

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



More information about the jboss-user mailing list