-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Questions about Hibernate log.
PostPosted: Mon Jan 30, 2006 8:37 am 
Newbie

Joined: Fri Jul 15, 2005 1:16 pm
Posts: 7
Hello!
I'm using Hibernate EntityManager and Annotations and I see that it's logging every operation and showing them on the console. Does Hibernate store that log in a file? If so, where can I find this file? Also, how can I disable the log if I want?
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 10:31 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
hibernate uses log4j. put the log4f jar file on your classpath, make a log4j.properties file, then you can specify where, and how much logging is performed.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 12:22 pm 
Newbie

Joined: Fri Jul 15, 2005 1:16 pm
Posts: 7
I think that my version of Hibernate is using commons-logging-1.0.4.jar because it is in my classpath and Log4j is not. So, how should I proceed?
Thank you.[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 30, 2006 12:37 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
MarcosAntonioPS wrote:
I think that my version of Hibernate is using commons-logging-1.0.4.jar because it is in my classpath and Log4j is not. So, how should I proceed?
Thank you.
[/quote]

the commons-logging library file allows you to specify a logging variable to use. it is then typical of java applications to use log4j to configure the logging settings.

I think hibernate comes with the log4j jar, but if it doesn't, just d/l it, put it on your classpath, then make a file called "log4j.properties" which must be in a source folder.

you should be able to find a standard configuration for the log4j.properties file online, if you can't, I can post mine here :)

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.