File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes log4j excessive logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j excessive logging " Watch "log4j excessive logging " New topic
Author

log4j excessive logging

Dino Be
Greenhorn

Joined: Apr 30, 2009
Posts: 3
Hi all,

I'm running an application using struts, spring framework, spring security, hibernate, displaytag, etc etc
I have configged a log4j properties file as follows:


I have a console appender which should show my log.info statements which are logged in a rolling file using the rolling file appender.
When booting my local tomcat machine or checking the catalino.out on our server we see a lot of logging such as:

DEBUG o.a.commons.digester.Digester.sax - endElement(,action,action)
DEBUG org.apache.commons.digester.Digester - match='struts-config/action-mappings/action'
DEBUG org.apache.commons.digester.Digester - bodyText=''

DEBUG o.apache.struts.action.ActionServlet - Initializing module path '' action configs
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for '/selectlanguage'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for 'success'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for '/flowselection'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for 'flow1'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for 'flow2'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for '/searchbypostalcode'
DEBUG o.apache.struts.action.ActionServlet - Processing extensions for 'success'

How can I stop these annoying messages in my log? I have tried adding the different fatal logging levels for apache.commons, struts, .... but that doen't seem to do the trick.

Anybody got an idea why I keep seeing these (framework) debug log messages?
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Your setting of the Struts packages etc to use INFO or higher logging should work, can you post what you tried there?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Jan Smit
Greenhorn

Joined: May 15, 2009
Posts: 2
Your setting of the Struts packages etc to use INFO or higher logging should work, can you post what you tried there?


I guess I'm not really understanding what you are saying here, but in my log4j properties files I have added:

log4j.logger.org.apache.commons=fatal
log4j.logger.org.spring=fatal
log4j.logger.org.hibernate=fatal
log4j.logger.org.hibernate.SQL=fatal
log4j.logger.org.displaytag=fatal
log4j.logger.org.apache.struts=fatal
log4j.logger.org.apache.struts.action=fatal


so these frameworks should only log something when they reach the fatal fase (these should never happen). Unfortunately I still see these frameworks logging all kinds of info:

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Try FATAL in CAPS
Jan Smit
Greenhorn

Joined: May 15, 2009
Posts: 2
Try FATAL in CAPS


I added FATAL to these, but I keep seeing DEBUG level messages... very annoying

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Sorry, I can't see anything else you might be doing wrong
Tanzy Akhtar
Ranch Hand

Joined: Jul 19, 2009
Posts: 110
Hi Dino,

Have you got any solution to the problem?
If yes then please share with us.

What i found, please define this



Thanks,
Tanzy.


Roll with punchers, there is always tomorrow.
Techie Blog -- http://jtanzy.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j excessive logging
 
Similar Threads
Logging
Log4J Configuration Problem
customize appenders within rootCategory
Frontman 2 FileNotFoundException ?
thread safe logging in a servlet