Show TOC

Cluster Log Configuration FileLocate this document in the navigation structure

The configuration file for cluster logging is cluster.log.properties, which is a log4j property file.

Each cluster has a cluster log configuration file, which resides in the cluster's working directory:

STREAMING_HOME/cluster/config/<cluster-name>/cluster.log.properties.

Ensure that the cluster log configuration file is located in the same directory as that cluster's configuration file, <cluster-name>.xml.

Sample cluster.log.properties file:

com.sybase.esp.cluster.logfile=cluster.log

log4j.rootLogger=info, Log

log4j.logger.com.sybase.esp=info
log4j.logger.com.sybase.esp.cluster.applications=info
log4j.additivity.com.sybase.esp.cluster.applications=false

log4j.appender.Log=org.apache.log4j.RollingFileAppender
log4j.appender.Log.File=${com.sybase.esp.cluster.logfile}
log4j.appender.Log.MaxFileSize=1MB
log4j.appender.Log.MaxBackupIndex=5
log4j.appender.Log.layout=org.apache.log4j.EnhancedPatternLayout
#log4j.appender.Log.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss.SSS} %p %c - %m%n
#log4j.appender.Log.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss.SSS} %p %c{1.} - %m%n
log4j.appender.Log.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss.SSS} %p - %m%n

.level=INFO
handlers=com.sybase.esp.cluster.impl.Log4JHandler
com.sybase.esp.cluster.impl.Log4JHandler.level=FINEST
 
In this sample configuration, the com.sybase.esp.cluster.logfile property in the first line specifies that the cluster log is written to the log file cluster.log, which is located by default in the cluster working directory, STREAMING_HOME/cluster/config/<cluster-name>. If you want to write the cluster log elsewhere, specify a path relative to the cluster working directory.
Note You can also set the log file location directly in the appender that writes the log file. In the example above, change the value of log4j.appender.A.File to the desired path and file name, where the path is relative to the node working directory.

The cluster log file is configured by default to back up its contents once the file reaches 1MB in size. The MaxBackUpIndex option specifies how many backup files to create.

You can set the rootLogger and logger.com.sybase.esp options to error or info. The info option produces minimum log information. Under normal circumstances, keep the rootLogger option set to the default value info, or the log becomes almost unreadable because of its size. You can use logger.com.sybase.esp to debug a node without using third-party debugging components. Do not modify the log4j.logger.com.sybase.esp.cluster.applications property; the info value is required in this instance.

com.sybase.esp.cluster.loggers.security.Audit is available as a unique logger which logs significant security audit events, including user login and log out, user authorization and user session expiration. Specifying a special appender for this logger will allow these events to be written to a separate log file. The lines in the sample configuration file that pertain to isolating the security audit events into a separate file are:
log4j.logger.com.sybase.esp.cluster.loggers.security.Audit=info, AuditLog   

log4j.additivity.com.sybase.esp.cluster.security.Audit=false   

log4j.appender.AuditLog=org.apache.log4j.RollingFileAppender   
log4j.appender.AuditLog.File=audit.log   
log4j.appender.AuditLog.MaxFileSize=1MB   
log4j.appender.AuditLog.MaxBackupIndex=5   
log4j.appender.AuditLog.layout=org.apache.log4j.EnhancedPatternLayout   
log4j.appender.AuditLog.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss.SSS} %p - %m%n      

Consult log4j documentation for more information on supported properties and configuration instructions.