Afternoon,
                                                                                
                                                           
I have a log4j problem with a webapp deployed in jboss.
                                                                                
                                                           
My webapp has a bean called Pound which when initialised creates a 
org.jboss.logging.Logger instance and then tries logging at all the log levels.
                                                                                
                                                           
Although in my log4j.xml config file I have something which says anything under 
com.companyx should not log anything under the WARN level. But the Pound class 
still does. The other category configs dont work either (even when others are 
commented out).
                                                                                
                                                           
Am I missing a trick or something? Samples below -

Java File

  | package com.companyx.money;
  |                                                                             
                                                               
  | import org.apache.log4j.*;
  |                                                                             
                                                               
  | class Pound
  | {
  |     public Pound()
  |     {
  |         // Setup logger
  |         org.jboss.logging.Logger log = 
org.jboss.logging.Logger.getLogger(Pound.class);
  |                                                                             
                                                               
  |         // Try various log levels
  |         log.debug("DEBUG");
  |         log.info("INFO");
  |         log.warn("WARN");
  |         log.error("ERROR");
  |         log.fatal("FATAL");
  |     }
  | }
  | 

log4j.xml config file

  | <!-- My preference -->
  | <category name="com.companyx">
  |     <priority value="WARN"/>
  | </category>
  |                                                                             
                                                               
  | <category name="com.companyx.money">
  |     <priority value="WARN"/>
  | </category>
  |                                                                             
                                                               
  | <category name="Pound">
  |     <priority value="WARN"/>
  | </category>
  | 

Any help would be appreciated

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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to