-->
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: to set property show_sql can show hql but how to save it to
PostPosted: Thu Feb 17, 2005 10:03 am 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
to set property show_sql can show hql but how to save it to log?
can use log config like log4j?

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 17, 2005 10:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Look at the log4j properties file in the Hibernate distribution.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 18, 2005 2:13 pm 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
I use a jdbc append and this sql string for insert.
this appender can work with other class.

<param name="ConversionPattern" value="INSERT INTO LOG4J (log_level,log_time,location,message) VALUES ('%-5p','%d{yyyy-MM-dd hh:mm:ss.SSS}','%l','%m')"/>


now, I configed in the log4j.xml

<category name="net.sf.hibernate.SQL">
<level value="debug"/>
<appender-ref ref="jdbc"/>
<appender-ref ref="stdout"/>
</category>


it can print in stdout, but can't insert into database.

could you tell me what's happend?

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 18, 2005 2:20 pm 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
and, the outputted sql string does not with param replaced

it has only " param= ? ".

how do I?

_________________
I am the creatxr of world.


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.