mbrunecky wrote:
I am afraid the original posting asks about STANDARD OUTOUT.
Hibernate (when configured to do so: hibernate.show_sql) echos all SQL querries - to standard output. I have no idea why this goes to std out when all of the Hibernate is using log4j.
Well, it's not. You didn't read my answer :). As I said, it's using commons-logging. Log4j is just one logging facility that may be used. In fact, it's often used, but Hibernate has not dependency on it at all.
Imo, if you're right asserting that mikew01 has hibernate.show_sql set to true. Then, he just needs to set it to false. In fact, if he sets it to false, and set the org.hibernate.SQL logger to debug, he will be able to do what he wants with output. These two configurations (hibernate.show_sql or logging via commons-logging) are not related: you could even see both output to the console if the first was set to true and the second configured to use a ConsoleAppender...
Maybe mikew01, you will be limited by the JDK logging possibilities, but what you want to achieve is very very simple and feasible. So, don't worry :).