Apama Documentation : Deploying and Managing Apama Applications : Correlator Utilities Reference : Using the Apama component extended configuration file : Setting log files and log levels in an extended configuration file
Setting log files and log levels in an extended configuration file
You can configure per-package logging in two ways:
*Statically, in the extended configuration file when starting the correlator, as described here.
*Dynamically, using the following engine_management options: --setApplicationLogFile and --setApplicationLogLevel. See Setting logging attributes for packages, monitors and events.
To set log files and/or log levels for EPL root, packages, monitors, or events, specify entries in the [ApplicationLogging] section of the extended configuration file.
To set the default log file and level for the EPL root package, specify two lines in the following format:
RootFile=rootLogFilename
RootLevel=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:
RootFile=apama\\root.log
RootLevel=ERROR
Note that you must insert a backslash to escape special characters. In the previous example, there is a filepath that contains a backslash that must be escaped. Hence, the double backslash. 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 two lines in the following format:
PackageFile.node=nodeLogFilename
PackageLevel.node=NODELOGLEVEL
Replace node with the name of the EPL package, monitor, or event you are setting the logging attribute for. 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:
PackageFile.com.myCompany.Client=apama\\Client.log
PackageLevel.com.myCompany.Client=DEBUG
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 configuration file. The last line that refers to a given node takes priority over earlier lines. When you set log attributes in the extended configuration file, the rules for hierarchical logging apply. See Setting logging attributes for packages, monitors and events.
If you pass an extended configuration file to a correlator when you start that correlator and the configuration file contains an [ApplicationLogging] 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 [ApplicationLogging] section, then correlator initialization does not include any log settings except for the default correlator log.
Whether or not you specify an extended 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-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback