How to disable Hibernate, SQL and c3p0 logging

  • 7015032
  • 08-May-2014
  • 28-Jul-2014

Environment

Novell ZENworks Configuration Management 11.2
Novell ZENworks Configuration Management 11.3

Situation

The documentation https://www.novell.com/documentation/zenworks113/zen11_upgrade/data/brn2dm5.html instructs to disable Hibernate, SQL and 3cp0 logging but does not suggest how to do that.

By default this additional logging is not enabled, and should only be temporarily enabled when needed for NTS.

Resolution

Restore the original  log4j.properties from backed up original.  Restart the zenworks services (novell-zenworks-configure -c Start) when finished.

The log4j.properties file can be found at the following locations:

Windows:  %ZENWORKS_HOME%\share\tomcat\conf
Linux:  /opt/novell/zenworks/share/tomcat/conf

If a backup was not kept, ensure that the Hibernate, SQL or 3cp0 lines are either commented out as shown (# character at the start of the line) or that the lines are not in the file at all.

# 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=C:\Program Files (x86)\Novell\ZENworks\logs\hibernate_zenserver.log
#log4j.appender.HQLAppender.MaxFileSize=100MB
#log4j.appender.HQLAppender.MaxBackupIndex=20
#log4j.appender.HQLAppender.layout=org.apache.log4j.PatternLayout
#log4j.appender.HQLAppender.layout.ConversionPattern=%d{ISO8601} %p [%x] %m%n

#Hibernate debug logging:
 
#log4j.logger.org.hibernate.SQL=DEBUG, TraceAppender
#log4j.logger.org.hibernate.type=TRACE, TraceAppender
#log4j.additivity.org.hibernate.SQL=false
#log4j.appender.TraceAppender=org.apache.log4j.RollingFileAppender
#log4j.appender.TraceAppender.File=/var/opt/novell/log/zenworks/hibernate.log
#log4j.appender.TraceAppender.MaxFileSize=10MB
#log4j.appender.TraceAppender.MaxBackupIndex=2
#log4j.appender.TraceAppender.layout=org.apache.log4j.PatternLayout
#log4j.appender.TraceAppender.layout.ConversionPattern=%d{ISO8601} %p [%x] %m%n
 
#SQL debug logging:
 
# This log4j configuration file controls logging for non-ZENworks components,
# for example, Hibernate, Tomcat, etc.  By default, this will be OFF.
#log4j.rootLogger=DEBUG
#log4j.category.org.hibernate.SQL=DEBUG, R
#log4j.category.com.novell.web.controls=DEBUG, R
#log4j.appender.R=org.apache.log4j.RollingFileAppender 
#log4j.appender.R.File=/var/opt/novell/log/zenworks/log4j.log
#log4j.appender.R.MaxFileSize=10MB 
#log4j.appender.R.MaxBackupIndex=10 
#log4j.appender.R.layout=org.apache.log4j.PatternLayout 
#log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %t %c - %m%n


# C3P0 logging configuration
#log4j.logger.com.mchange=DEBUG, C3P0Appender
#log4j.appender.C3P0Appender=org.apache.log4j.RollingFileAppender
#log4j.appender.C3P0Appender.File=C:\Program Files (x86)\Novell\ZENworks\logs\c3p0_zenserver.log
#log4j.appender.C3P0Appender.MaxFileSize=100MB
#log4j.appender.C3P0Appender.MaxBackupIndex=20
#log4j.appender.C3P0Appender.layout=org.apache.log4j.PatternLayout
#log4j.appender.C3P0Appender.layout.ConversionPattern=%d{ISO8601} %p [%x] %m%n






Feedback service temporarily unavailable. For content questions or problems, please contact Support.