-->
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: how do I get rid of Hibernate: insert into output?
PostPosted: Thu Dec 06, 2007 1:19 am 
Newbie

Joined: Thu Dec 06, 2007 12:59 am
Posts: 2
I have created a small application using hibernate 3. I am inserting rows into a MySQL database. For every row I insert I get a line of output that starts:
Hibernate: insert into...
then gives the table and column names.
I have done a lot of looking in the documentation and many google searches. I see lots of information on enabling MORE logging but I don't see how to get rid of this line. I have tried changing everything in the log4j.properties file to warn or error. I have also tried commenting out the log level lines. I have tried getting rid of log4j.properties all together. No matter what I do I continue to see this output. How do I get rid of it? Other logging output is affected as I would expect when changing the log4j.properties file but I just can't get rid of this line.

any ideas?
thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 7:20 am 
Newbie

Joined: Tue Nov 27, 2007 3:17 am
Posts: 5
I think that you have set 'true' for the property show_sql in ur configuration file,which is by default hibernate-configuration.xml. try to set to false then check


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 7:30 am 
Expert
Expert

Joined: Thu May 26, 2005 9:19 am
Posts: 262
Location: Oak Creek, WI
Did you set the hibernate.show_sql to false?

_________________
RamnathN
Senior Software Engineer
http://www.linkedin.com/in/ramnathn
Don't forget to rate.


Top
 Profile  
 
 Post subject: found it
PostPosted: Thu Dec 06, 2007 10:18 am 
Newbie

Joined: Thu Dec 06, 2007 12:59 am
Posts: 2
OK, I feel really stupid. I just found this in hibernate.cfg.xml:
<property name="show_sql">true</property>

I know I checked this yesterday but must have missed it. I spent most of my time working with log4j.properties, I really expected it to be there.
Of course, setting this to false gets rid of the output.

thanks for the replies,
Jason


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.