Log Configuration
The log4j configuration for JID is located in the file $SCHEDULER_HOME/lib/JID-log4j.properties
The default content is
log4j.rootLogger=info, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
If you want to modify the logging then you have to create your own log4j properties file.
You have to set the environment variable LOG4JPROP in ./user_bin/dashboard_environment_variables.(sh|cmd) so that the file is found.
You find an example ./user_bin/dashboard_environment_variables.(sh|cmd)-example. Rename this file to ./user_bin/dashboard_environment_variables.(sh|cmd). On Unix make sure that ./user_bin/dashboard_environment_variables.sh is executable.
Example .\user_bin\dashboard_environment_variables.cmd (Windows):
... set LOG4JPROP="file:///C:/path/to/my_log4j.properties"
Example ./user_bin/dashboard_environment_variables.sh (Unix):
... LOG4JPROP="file:///path/to/my_log4j.properties"
Logging to a file:
# Direct log messages to a log file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=C:/temp/1.log log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=1 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.rootLogger=INFO, file log4j.logger.org.hibernate=INFO log4j.logger.org.hibernate.type=ALL
Logging to a file and additionally to stdout:
#Direct log messages to a log file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=C:/temp/1.log log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=1 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n log4j.rootLogger=INFO, file, stdout log4j.logger.org.hibernate=INFO log4j.logger.org.hibernate.type=ALL
Some additional options for logging:
# Direct log messages to a log file log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=C:/temp/1.log log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=1 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n #Log class to file with debug level log4j.logger.com.sos.dailyschedule.SosSchedulerDashboardMain=debug,file #Log package to file with debug level log4j.logger.com.sos.dailyschedule=debug,file ### Log everything (a lot of information, but very useful for troubleshooting) ### #log4j.logger.org.hibernate=info ### Log HQL and SQL ASTs during query parsing ### log4j.logger.org.hibernate.hql.ast.AST=DEBUG, SQL_APPENDER log4j.additivity.org.hibernate.hql.ast.AST=true ### log just the SQL log4j.logger.org.hibernate.SQL=DEBUG, SQL_APPENDER log4j.additivity.org.hibernate.SQL=true ### log JDBC bind parameters. Very userfull, when debug parameterized queries ### log4j.logger.org.hibernate.type=TRACE, SQL_APPENDER log4j.additivity.org.hibernate.type=true ### log schema export/update ### log4j.logger.org.hibernate.tool.hbm2ddl=info ### log HQL parse trees log4j.logger.org.hibernate.hql=debug ### log cache activity ### log4j.logger.org.hibernate.cache=info ### log transaction activity log4j.logger.org.hibernate.transaction=debug ### Log all JDBC resource acquisition log4j.logger.org.hibernate.jdbc=debug ### enable the following line if you want to track down connection ### ### leakages when using DriverManagerConnectionProvider ### log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace log4j.rootLogger=INFO, file, stdout log4j.logger.org.hibernate=INFO log4j.logger.org.hibernate.type=ALL