-->
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.  [ 6 posts ] 
Author Message
 Post subject: How do I disable console output?
PostPosted: Tue Jan 17, 2006 4:47 pm 
Newbie

Joined: Tue Jan 17, 2006 4:45 pm
Posts: 4
I have configured the log4j properties correctly. If I eg set to DEBUG logging, I get much more information. However, if I set to ERROR, I still get log
information to my console, eg:

Hibernate: select user0_.userid as userid0_, user0_.firstname as firstname0_, user0_.lastname as lastname0_, user0_.email as email0_, user0_.password as password0_, user0_.roles as roles0_, user0_.country
as country0_, user0_.lastLogin as lastLogin0_ from users user0_ where user0_.email=?

How do I disable this? I have the "show_sql" property set to false in the config file too.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 4:53 pm 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
When you use Tomcat or JBoss you may have to look the log4j configuration there.

Regards Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 5:13 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
As you're getting sql output even though you've set show_sql to false, no amount of log4j tweaking is going to help. You must have set show_sql to true in code somewhere and forgotten about it. If you load a configuration from a file, then set properties, then create the session factory, the in-code changes override the config file settings.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 5:13 pm 
Newbie

Joined: Tue Jan 17, 2006 4:45 pm
Posts: 4
LaLiLuna wrote:
When you use Tomcat or JBoss you may have to look the log4j configuration there.


I am using Tomcat, yes.

Where/how? Anyone with an example?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 5:15 pm 
Newbie

Joined: Tue Jan 17, 2006 4:45 pm
Posts: 4
tenwit wrote:
As you're getting sql output even though you've set show_sql to false, no amount of log4j tweaking is going to help. You must have set show_sql to true in code somewhere and forgotten about it. If you load a configuration from a file, then set properties, then create the session factory, the in-code changes override the config file settings.


It only shows this output when I load objects, not with update or save. I did not set it in code, no.

Log4j is configured as the first thing in the application. Where/how do I then, per session, reset the logging to not use console?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 5:35 pm 
Newbie

Joined: Tue Jan 17, 2006 4:45 pm
Posts: 4
Found the problem, thanks.... silly mistake. The ant build script took an outdate cfg file for the .war.

doh.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.