-->
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.  [ 3 posts ] 
Author Message
 Post subject: Logging sql bind parameters
PostPosted: Wed Aug 22, 2007 8:57 am 
Newbie

Joined: Wed Aug 22, 2007 8:44 am
Posts: 5
Location: Brussells
Hi,

I am trying to use log4j logging to view the jdbc bind parameters being used by hibernate. On app startup I get logging such as this suggesting log4j logging is working fine and I can control thresholds displayed:
3468 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15

When hibernate runs a query the loggin looks like this:

Hibernate: select directcost0_.activity_id as activity1_0_, directcost0_.external_cost as external2_0_, directcost0_.internal_cost as internal3_0_, directcost0_.program_year as program4_0_, directcost0_.order_number as order5_0_ from activity_direct_costs directcost0_ where directcost0_.activity_id=?

Adding log4j.logger.org.hibernate.type=debug to my log4j.properties has no effect. Can anybody tell me how to view the parameters rather than '?'?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 22, 2007 1:42 pm 
Newbie

Joined: Wed Aug 22, 2007 1:16 pm
Posts: 2
Location: Kansas USA
You can use http://www.p6spy.com. It takes about 5 min to setup and you can switch between your regular driver and the spy driver for debugging.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 9:01 am 
Newbie

Joined: Wed Aug 22, 2007 8:44 am
Posts: 5
Location: Brussells
Cheers for that, it works well


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