• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Spring / Hibernate Logging

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since I think this is a Hibernate thing, I will post here. Sorry if it's in the wrong place.

So I created a web application which uses Spring and Hibernate. During every hibernate call, there is some log data being sent to standard out which I do not want.

Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:
Tue Oct 04 16:16:46 PDT 2005 TRACE:

Now imagine this like a few hundred times in your log file. Does anyone know why and how I can disable this??? I am pretty sure this is Hibernate as it wasn't happening until I integrated Hibernate.

HELP!!!

Thanks in Advance!!!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate uses Commons Logging to control its log messages. It logs at INFO level by default, so there must be a configuration somewhere else in your application which is asking for log levels at TRACE. Look at the class the log method is being made from (should be included in the log message) - is it a Hibernate class? It depends which logging framework you are using as to where a config. file will be, if its log4j then log4j.properties will be on your classpath somewhere. If its JDK logging its JAVA_HOME/jre/lib/logging.properties.
 
Edgar Castanedo
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info. It looks like my app is using standard JDK logging. I tried to implement log4j, but was not succesful. I tried to add the log4j jar file in my WEB-INF/lib and my Spring Beans would not load any longer. Tomcat complains that it could not find the bean classes. I am assuming some library that log4j uses is breaking down which may be caused by some CLASSPATH issues introduced when I added log4j. Does this make sense? Anybody ever deal with this issue?
 
Can't .... do .... plaid .... So I did this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic