Using Hibernate logging, you can debug the calls happening from ZENworks at the hibernate level, such as calls to the database, and mapping between the ZENworks objects and the database entries.
IMPORTANT:Performance of the ZENworks Primary Server is affected with Hibernate logging enabled. Disable or do not enable the Hibernate logging when you are not debugging.
To enable Hibernate logs, perform the following steps:
Edit the log4j.properties file in the ZENworks Primary Server to add the following lines:
# Hibernate logging configuration
log4j.logger.org.hibernate.SQL=DEBUG, HQLAppender
log4j.logger.org.hibernate.type=TRACE, HQLAppender
log4j.additivity.org.hibernate.SQL=false
log4j.appender.HQLAppender=org.apache.log4j.RollingFileAppender
log4j.appender.HQLAppender.File=/var/opt/novell/log/zenworks/hibernate_zenloader.log
log4j.appender.HQLAppender.MaxFileSize=100MB
log4j.appender.HQLAppender.MaxBackupIndex=20
log4j.appender.HQLAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.HQLAppender.layout.ConversionPattern=[%t] %d{ISO8601} %p [%x] %m%n
For logging the ZENServer process hibernate calls, the location of the log4j.properties file is as given below:
Linux: /opt/microfocus/zenworks/share/tomcat/conf/
Windows: %ZENSERVER_HOME%\services\zenserver\conf
For logging the ZENLoader process hibernate calls, the location of the log4j.properties file is as given below:
Linux: /etc/opt/microfocus/zenworks/loader-logging/
Windows: %ZENSERVER_HOME%\conf\loader-logging\
Customize the log file name according to your requirement.
Save the file and restart the ZENworks services.
To disable the Hibernate logging, comment/remove the lines added in log4j.properties file and restart the ZENworks services.