Logging Configuration

This appendix document how logging is configured in daqOcmServer and daqDpmServer.

Defaults

The logging defaults are provided by RAD and configure two appenders with root logger verbosity specified from commmand line or configuration file. Documented here is behaviour of RAD v5.5.0 and CII v4.2.0:

console

Which logs to console.

syslog

Which logs to syslog using CII log format.

logsink

Which logs to a simpler more readable format than CII, with the destination ${DAQ_LOGS}/{process-name}.log where ${DAQ_LOGS} and {process-name} is substituted with the environment value of ${DAQ_LOGS} and configured process name.

Note

This is only enabled if the environment variable DAQ_LOGS is set, is an existing directory and is writable.

Changed in version 3.1.0: Replaces functionality of $CII_LOGS which was removed in CII v4.0.0.

Log Properties File

Both daqOcmServer and daqDpmServer configurations allow user to specify a log4cplus properties file which configures the logging. To avoid interference with default CII compatible logging configuration it is recommended that this log properties file is limited to configure preset verbosity of named loggers.

Warning

Configuring verbosity with or without specifying default appenders for the root logger using log4cplus.rootLogger = {verbosity} or log4cplus.rootLogger = {verbosity}, console, logsink does not work and will result in appenders being removed and no logs.

Note

To set verbosity of root logger itself pass the desired verbosity level via command line.

See also

For a list of loggers see the following sections for OCM and DPM.

Example:

# Built-in levels are in less to more verbose:
# OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE
log4cplus.logger.malZpbClientAsyncImpl=ERROR
log4cplus.logger.malZpbServer=ERROR
log4cplus.logger.rad=INFO
log4cplus.logger.rad.sm=WARN
log4cplus.logger.scxml4cpp=INFO

log4cplus.logger.daq.ocm=DEBUG