[jboss-user] [Beginners Corner] - lo4j levels with Jboss App server

trouby do-not-reply at jboss.com
Wed Aug 1 11:39:00 EDT 2007


Hey,

I have some classes which I've added a static reference to the logger as:

  | private static Logger logger = Logger.getLogger(MyClass.class.getName());
  | 
where MyClass full pkg is "rootPkg.subPkg.MyClass"

Then I simply use the logger in many places by invoking logger.debug("message"), etc...


Now assuming I want to have logs for ALL levels -ONLY- for MyClass, how do I do it?

I tried to add to jboss-log4j.xml a category such as:


  | <category name="rootPkg.subPkg">
  |       <priority value="TRACE"/>
  | </category>
  | 

but it did not affect anything and I only got messages at INFO level,

In the console appender, I have seen the 

  | <param name="Threshold" value="INFO"/>'
  | 

parameter, but when I change this line it affects all loggers in all packages,



any clue?

Thanks,

Asaf.

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

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



More information about the jboss-user mailing list