This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes hibernate logs to disable 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 » Other Open Source Projects
Bookmark "hibernate logs to disable" Watch "hibernate logs to disable" New topic

hibernate logs to disable

Muse Ran
Ranch Hand

Joined: Sep 17, 2008
Posts: 317
Hi all
i am using log4j.xml to logging. I want to disable all hibernate related logs from in the logger. for that what i have to do (write) in log4j.xml

please advise


Tomorrow will surely be a new day!!!
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3274

Hi there,

Yes you can exclude certain APIs from being logged at certain levels by using categories, try this:

<category name="org.hibernate">
<priority value="WARN"/>

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link:
subject: hibernate logs to disable
Similar Threads
Different Appender for each level
my logs!, who ate my logs?
use of log4j.xml
How to configure log4j.xml to log only WARN and above logs in JBOSS?
prob in JBoss and log4j