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 Murach's Java Servlets and JSP this week in the Servlets 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: 9929
    
159

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to configure log4j.xml to log only WARN and above logs in JBOSS?
 
Similar Threads
log4j.xml configuration for configuring input from specific file only to consider logging.
How to filter out application specific log from server.log
JMS Queue : Log4j Warning
[log4j] How to split logs?
JBoss and Log4j