How to enable Hibernate logging
SummaryHow to enable Hibernate logging for the application?
Follow the steps given below to enable the hibernate logging in the application:
1. In the location <workspace location>/ChordiantEAR/config/chordiant/hibernate/, three files, listed below, are present for out-of-the-box modules and services:
Set show_sql tag to true in the files:
If there are any custom .cfg.xml files listed in this location, set show_sql to true in those files too.
2. In the location <workspace location>\ChordiantEAR\config\chordiant\ we have log4j.properties file, uncomment the line log4j.logger.org.hibernate.type=DEBUG in the log4j.properties file as shown below.
#uncomment hibernate.type=DEBUG for detailed log4j logging
#if hibernate show_sql=true is set in hibernate.cfg file
3. Publish and restart the server to pickup the changes. The sysout logs will have the hibernage logs as well.
Published September 7, 2016 - Updated September 15, 2016