Hi everyone,
i'm trying to debug a couple of statements and I've enabled SQL statement logging (I think) on hibernate.cfg.xml and tweaked the log4j.properties file to debug, but I can't seem to get any SQL output.
The content of the files are:
hibernate.cfg.xml
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.username">user</property>
<property name="connection.password">private</property>
<property name="connection.url">jdbc:postgresql://localhost/mydb</property>
<property name="show_sql">true</property>
<mapping resource="demo/Doc.hbm.xml" />
<mapping resource="demo/DocLin.hbm.xml" />
</session-factory>
</hibernate-configuration>
-------------------
and log4j.properties:
Code:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug, stdout
log4j.logger.net.sf.hibernate=debug
log4j.logger.net.sf.hibernate.SQL=debug
Any ideas of why this doesn't work?