title: Enabling Logging for JpaTransactionManager
body: <p>I am using JpaTransactionManager with hibernate 3 inside spring 3.5 container. I am not able to enable logging for JPA. I wish to see the logs for transaction management for debugging some of my services. I am using log4j.</p>
  
  <p>Here is what I have in my log4j.properties</p>
  
  <pre><code># For JPA
  log4j.logger.org.springframework.orm.jpa=DEBUG
  log4j.logger.org.springframework.orm.jpa.JpaTransactionManager=DEBUG
  log4j.logger.org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter=DEBUG
  log4j.logger.org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean=DEBUG
  log4j.logger.org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor=DEBUG
  log4j.logger.org.springframework.transaction=DEBUG
  log4j.logger.org.springframework=DEBUG
  log4j.logger.org.hibernate=DEBUG
  log4j.logger.org.hibernate.SQL=DEBUG
  
  # Redirect log messages to a log file
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=C:\\apps\application.log
  log4j.appender.file.MaxFileSize=1MB
  log4j.appender.file.MaxBackupIndex=5
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
  
  # Direct log messages to stdout
  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
  
  # Root logger option
  log4j.rootLogger=ALL, file
  </code></pre>