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

gan.gary do-not-reply at jboss.com
Fri Jul 25 06:14:28 EDT 2008


let's say I have this in my POJO:

static final Logger logger = Logger.getLogger(OrderHandler.class);
and this in my "jboss-log4j.xml"

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
  |       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |       <param name="File" value="${jboss.server.log.dir}/server.log"/>
  |       <param name="Append" value="false"/>
  | 		<!--<param name="Threshold" value="TRACE"/> -->
  | 		 <param name="Threshold" value="INFO"/>
  |       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
  |  
  | 
  |       <layout class="org.apache.log4j.PatternLayout"> 
  |          <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  |  
  |       </layout>
  |    </appender>

what if I need to log application trace in default log and own other information another log?

from log4j: 
For example, in   
  |  
  | Logger x = Logger.getLogger("wombat");
  | Logger y = Logger.getLogger("wombat"); 
  | x and y refer to exactly the same logger object.

But what I want is: 
 
  | Logger x = Logger.getLogger(FILE appender A);
  | Logger y = Logger.getLogger(FILE appender B); 

how to achive that?

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

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



More information about the jboss-user mailing list