Thanks Rob . That was pretty helpful tip!! Thanks & Regards _______________________________ Khaliq ________________________________
From: Rob Hills [mailto:[EMAIL PROTECTED] Sent: Mon 1/14/2008 3:14 PM To: [email protected] Subject: RE: [appfuse-user] SOLVED - AppFuse 2.0 + Hibernate - logging SQL Parameters Hi All, On 14 Jan 2008 at 18:20, Rob Hills wrote: > On 14 Jan 2008 at 11:32, GAFFAR Abdul Khaliq wrote: > > > Is it possible to see the values passed to sql queries ?During debugging > > ,it would be really great to know what values are being passed to sql > > queries > > Yes, it is possible, but the only way I've found to do that in AppFuse 2 is in > the log4j.xml file: > > <logger name="org.hibernate.type"> > <level value="TRACE" /> > </logger> > > Note, you have to set the value to TRACE - with DEBUG, you don't get to > see the parameter values! > > I've not yet had a chance to see if placeholder will work there, it'd be cool > if it > did. WOOHOO, I just tried this and it worked. I put the following in my pom.xml properties section: <properties> <-- --> <hibernate.log.sql.params>FATAL</hibernate.log.sql.params> <-- --> </properties> Then, I put this in my dev profile: <properties> <-- --> <hibernate.log.sql.params>TRACE</hibernate.log.sql.params> <-- --> </properties> and finally, in my log4j.xml file, I put this: <logger name="org.hibernate.type"> <level value="${hibernate.log.sql.params}" /> </logger> and it all works! I reiterate that you must use TRACE in order to see sql parameter values. I read somewhere on a hibernate list that DEBUG level wont print out parameter values. HTH, Rob Hills Waikiki, Western Australia Mobile +61 (412) 904-357 Fax: +61 (8) 9529-2137 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Statement: This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by return email. ----------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
