File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Soft Skills this week in the Jobs Discussion 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: 10288
    
168

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?