Apama 10.7.2 | Deploying and Managing Apama Applications | Correlator Utilities Reference | Configuring the correlator | Setting correlator and plug-in log files and log levels in a YAML configuration file
 
Setting correlator and plug-in log files and log levels in a YAML configuration file
In a YAML configuration file, you can configure the log file and/or log level individually for plug-ins, as well as for components of the correlator itself. You can do this either for the whole correlator or for individual categories. This includes setting the log level for individual connectivity plug-ins and EPL plug-ins.
Note:
You can also set the log levels individually on the command line (see Starting the correlator). If a log level is specified on the command line, it overrides any setting in the YAML configuration file.
To set the log levels in the YAML configuration file, specify entries in the correlatorLogging section. The syntax for this section is:
correlatorLogging:
.root:
level: ROOTLOGLEVEL
file: ROOTLOGFILE
category: CATEGORYLOGLEVEL
You can specify either the log level directly, or as a map with the key level. These are synonymous. To set the log file, you must use the map syntax.
.root is used to specify the default log file/level for the whole correlator. We do not recommend specifying a log level higher than INFO for the default log level, since important information may be lost from the log files.
Valid log levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL, CRIT or OFF.
You can use replacement tokens in a log file. See Specifying log filenames for more information.
The categories for which the logging can be configured are listed in the table below. Note that log categories are regarded as a hierarchy. For example, setting the log level for apama will be inherited by apama.status.
Example - the default log level for the whole correlator is set to INFO, and the log level for the connectivity plug-ins framework is set to DEBUG:
correlatorLogging:
.root:
level: INFO
apama.connectivity: DEBUG
This category
controls the following
apama.applicationEvents
Correlator application event logging. Provides detailed output of the inner workings of the correlator, such as context-state changes, event triggering, spawning, routing, etc. To enable application event logging, you have to set the log level of this category to DEBUG. See also Viewing garbage collection and application events information.
apama.connectivity
Connectivity plug-ins - framework.
apama.debughandler
Correlator EPL debugger.
apama.jms
Correlator-integrated messaging for JMS.
apama.messaging
Internal messaging-related messages.
apama.socket
Socket-level communications.
apama.status
Correlator status lines.
apama.streams
Stream queries within EPL.
apama.verboseGC
Correlator garbage collection messages for all monitors. To enable garbage collection logging, you have to set the log level of this category to DEBUG. See also Viewing garbage collection and application events information.
apama.verboseGC.MonitorName
Correlator garbage collection messages for the specified monitor. To enable garbage collection logging, you have to set the log level of this category to DEBUG. See also Viewing garbage collection and application events information.
com.apama.correlator.jms
Correlator-integrated messaging for JMS.
com.apama.adapters
Correlator-integrated messaging for JMS - mapping rules.
com.apama.jmon
JMon framework.
com.softwareag.connectivity
Connectivity plug-ins - Java framework.
connectivity.PluginName.
ChainName
Connectivity plug-ins - messages from a specific plug-in. Applies to connectivity plug-ins written in both C++ and Java.
connectivity.TransportName.
ManagerName
Connectivity plug-ins - messages from managers.
connectivity.apama.
hostPluginName.ChainName
Connectivity plug-ins - messages from the specified host plug-in. The valid host plug-in names (such as eventMap) are listed in Host plug-ins and configuration.
connectivity.chain.ChainName
Connectivity plug-ins - chain-related messages.
plugins.PluginName
EPL plug-ins - in C++, Java or Python.
Note that handling of Java logging is slightly different to EPL and Python. By convention, we recommend Java EPL plug-ins should specify plugins.PluginName when creating the Logger object, for example, com.apama.util.Logger.getLogger("plugins.MyPlugin"). However, this is only a convention, and if some other string or a Java class is specified instead, then that will be used as the correlator's log category.
Keep in mind that the logging for the EPL plug-ins is about logging from Java, Python and C++ plug-ins that can be called from EPL. For information on logging from EPL itself, see Setting EPL log files and log levels in a YAML configuration file.
Note:
It is not possible to dynamically change the correlator and plug-in log levels. Only EPL log levels can be dynamically changed (see also Setting EPL log files and log levels dynamically).