Cluster Node Log Configuration File

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

Create one cluster node log configuration file for each node in the cluster. Create the file in the directory from which the node is typically started. For example, on Windows, the node base directory is %ESP_HOME%\cluster\projects\<cluster-name> and on Linux/Solaris, the node base directory is $ESP_HOME/cluster/projects/<cluster-name>.

If you configure a cluster during installation, by default, the cluster node log configuration file is placed in <ESP_HOME>/cluster/nodes/<node-name>. Once you run a project on that cluster, the base directory changes to <ESP_HOME>/cluster/projects/<node-name>. As you configure additional clusters, you may change the base directory in which the cluster nodes are saved. Ensure that the cluster node log configuration file is located in the same folder as that node's configuration file.

A sample cluster.log.properties file:

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

log4j.rootLogger=info, A

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


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

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


.level=INFO
handlers=com.sybase.esp.cluster.impl.Log4JHandler
com.sybase.esp.cluster.impl.Log4JHandler.level=FINEST

In this sample configuration, the cluster node log is written to the log file cluster.log, which is configured 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.

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