aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to configure log4j.xml to log only WARN and above logs in JBOSS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to configure log4j.xml to log only WARN and above logs in JBOSS?" Watch "How to configure log4j.xml to log only WARN and above logs in JBOSS?" New topic
Author

How to configure log4j.xml to log only WARN and above logs in JBOSS?

lochan serma
Greenhorn

Joined: Apr 22, 2011
Posts: 23
Hi,

I would like to configure my log4j.xml so that it logs only WARN and higher level logs for the FILE appender(server.log) for all categories. However, i would like to leave the default INFO priority to CONSOLE appender as it is.
Any one with helping hands please.

Thank You.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10065
    
163

Just set the Threshold attribute of the FILE appender to WARN.

[My Blog] [JavaRanch Journal]
lochan serma
Greenhorn

Joined: Apr 22, 2011
Posts: 23
Thanks bro!!
Did it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to configure log4j.xml to log only WARN and above logs in JBOSS?