-->
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.  [ 5 posts ] 
Author Message
 Post subject: showSQL not using Loggers
PostPosted: Mon Nov 10, 2003 6:05 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 11:36 am
Posts: 46
Location: Rennes, France
Hello guys,

I'd like to improve Hibernate by switching the 'System.out.println' method called when printing the SQL requests (parameter showSQL set to true).

Would it be feasible to use the commons-logging API instead of writing directly to the standard output ?

Thanks !
Yann


Top
 Profile  
 
 Post subject: use log4j
PostPosted: Mon Nov 10, 2003 10:23 am 
Beginner
Beginner

Joined: Fri Aug 29, 2003 10:01 am
Posts: 34
Location: florence, italy
did you try checking log4j properties and enabling it ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 10, 2003 10:28 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 11:36 am
Posts: 46
Location: Rennes, France
Yes of course.
I've visited the source code of Hibernate 2.0.3 and have found this:

if (showSql) System.out.println("Hibernate: " + sql);

That would be very cool to change this to:

if (showSql) LogFactory.get("net.sf.hibernate.showSQL").info("Hibernate: " + sql);


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 9:34 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 11:36 am
Posts: 46
Location: Rennes, France
Any follow-up to this so great idea ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 1:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This was changed in Hibernate 2.1, all SQL is now logged to a special Logger


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