Joined: Fri Nov 03, 2006 9:49 am Posts: 1 Location: Harrisburg, PA
|
I have a similar question.
We're using the following with Spring 2.5.6. We're deploying to an Oracle 10g AS R2 (J2EE 1.3) and using a newer JDK (1.6.0_13): Hibernate Core 3.3.1GA Hibernate Entity Manager 3.4.0.GA Hibernate Annotations 3.4.0.GA
If I have all the properties off in the Spring applicationContext.xml:
<!-- <entry key="hibernate.show_sql" value="true" /> <entry key="hibernate.format_sql" value="true" /> -->
And have logging configured in log4j, I don't get any of the SQL in the log4j log.
If I simply uncomment the hibernate.format_sql entry, I get logging IN THE CONSOLE LOG, AND IN THE LOG4J LOG.
I really only want the logging of the SQL (and better yet the bind variables to) to the log4j log. I don't want the server's console log to fill up with this SQL as it's then in two places. I'd like the context of the web application session (which I'm already getting with log4j) to contain the corresponding SQL.
What is the "magic" I need to get this working?
Thanks, and much apprecation for any assistance.
Eric
|
|