Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j excessive logging

 
Dino Be
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your setting of the Struts packages etc to use INFO or higher logging should work, can you post what you tried there?
 
Jan Smit
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try FATAL in CAPS
 
Jan Smit
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try FATAL in CAPS


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

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I can't see anything else you might be doing wrong
 
Tanzy Akhtar
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic