Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Configuring the correlator : Setting log files and log levels in a YAML configuration file
Setting log files and log levels in a YAML configuration file
You can configure per-package logging in two ways:
*Statically, in the YAML configuration file when starting the correlator, as described here.
*Dynamically, using the following options of the engine_management tool:
--setApplicationLogFile
--setApplicationLogLevel
See Setting logging attributes for packages, monitors and events for detailed information.
To set log files and/or log levels for EPL root, packages, monitors, or events, specify entries in the eplLogging section of the YAML configuration file.
To set the default log file and level for the EPL root package, specify this in the following format:
eplLogging:
.root:
file: rootLogFilename
level: ROOTLOGLEVEL
Replace rootLogFilename with the name of the log file for the EPL root package. No spaces are allowed in the log file name. Replace ROOTLOGLEVEL with TRACE, DEBUG, INFO, WARN, ERROR, FATAL, CRIT or OFF. For example:
eplLogging:
.root:
file: apama/root.log
level: ERROR
You do not need to specify both a log file and a log level; you can specify one or the other. If you do not specify a log file or log level for the root package, it defaults to the correlator's log file/log level.
To set the default log file and level for an EPL package, monitor or event, specify this in the following format:
eplLogging:
  node:
file: nodeLogFilename
level: NODELOGLEVEL
Replace node with the name of the EPL package, monitor, or event for which you are setting the logging attribute. If a monitor or event is in a named package and not the root package, be sure to specify the fully qualified name. Replace nodeLogFilename with the name of the default log file for the specified EPL package, monitor or event. No spaces are allowed in the log file name. Replace NODELOGLEVEL with TRACE, DEBUG, INFO, WARN, ERROR, FATAL, CRIT or OFF. This is the default log level for the specified node. For example:
eplLogging:
com.myCompany.Client:
file: apama/Client.log
level: DEBUG
com.myCompany.Internal: { level: ERROR }
The above example shows both multi-line and single-line syntax. The single-line syntax is more compact when you are just setting either the log level or the file, but not both.
For a particular node, you do not need to specify both a log file and a log level; you can specify one or the other. If you do not specify a log file or log level for a particular node, it defaults to the settings for a parent node. See Tree structure of packages, monitors, and events.
There is no limit to the number of log settings that can appear in the YAML configuration file. The last line that refers to a given node takes priority over earlier lines. When you set log attributes in the YAML configuration file, the rules for hierarchical logging apply. See Setting logging attributes for packages, monitors and events.
If you pass a YAML configuration file to a correlator when you start that correlator and the configuration file contains an eplLogging section, the correlator uses the logging settings in that section. If you do not pass a configuration file when you start a correlator, or there are no settings in the eplLogging section, then correlator initialization does not include any log settings except for the default correlator log.
Whether or not you specify a YAML configuration file when you start a correlator, any log settings you specify can be overwritten after initialization by invoking the engine_management tool and specifying the --setApplicationLogFile and/or --setApplicationLogLevel options. See Managing application log levels and Managing application log files.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback