Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat, Hibernate and log4j issue

 
Pablo M�ller
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm not sure if this belongs to this forum or the hibernate one, but here it is:
I recently moved all the common libraries of my applications to the shared/lib folder of the tomcat (5.5.16). This includes hibernate and others (but not log4j). I have a log4j.properties in my application that sets the logging level for hibernate to WARN. But when I changed the location of the jars it started logging at INFO level and, because of this, it's taking a lot of time to deploy, not to mention all the unnecesary information I get, which makes it really hard to find the useful stuff.
I'm running tomcat from eclipse, to capture the stdout on the console. log4j.properties is the src folder, so it gets deployed inside WEB-INF/classes
Thanks a lot.
Pablo
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I place the logging jars in common/lib and the properties file in common/classes.

This causes Tomcat to set up the logging prior to issuing its own logging messages.
 
Pablo M�ller
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, that worked ok!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic