Developing Apama Applications > Developing Apama Applications in EPL > Using Correlator Plug-ins in EPL > Using the Log File Manager plug-in > Events that can be routed to the LoggingManager monitor
Events that can be routed to the LoggingManager monitor
The following events can be routed to the LoggingManager monitor. Note that the default settings are to use "INFO" for the log level, "normal" for the logging format, and "stdout" for the file:
LogEvent
event LogEvent {
   string level;
   string message;
}
Informs the monitor to log message at a set level, which should be set to one of “FATAL”, “ERROR”, “WARN”, “INFO”, “DEBUG”, or “TRACE”.
SetLogFile
event SetLogFile {
   string filename;
   boolean append;
}
Sets the log file filename should be set to identify the file to use, while append specifies whether to append to the file if it already exists. On receipt of this event log file rotation is de-activated; see the SetLogRotating event, below.
SetLogRotating
event SetLogRotating {
   string filenameTemplate;
   boolean useInternalTime;
   boolean append;
   integer rotatePeriod;
   integer rotateHour;
   integer rotateMinute;
}
Sets a log file to write all messages, and activates log file rotation. The parameters have the following meanings:
*filenameTemplate defines a template for naming the log file. The template can contain Time Format plug-in format specifiers, which should be surrounded by quotation marks, for example "correlator_'ddMMyyyy'.log", see Format specification for the Time Format plug-in functions.
*append indicates if the log message should be appended to the file if it already exists.
*useInternalTime should be set to true to use the correlator’s internal time, not the external system time, when creating the log file’s name.
*rotatePeriod indicates the periodicity of the rotation; 0=every minute, 1=hourly, 2=daily, 3=weekly on Sundays, 4=monthly on the first of the month.
*rotateHour specifies the hour at which to perform a rotation.
*rotateMinute specifies the minute in the hour at which to perform a rotation.
SetLogRotatingDaily
event SetLogRotatingDaily {
}
Sets log file rotation to daily (00:00) using the default filename template ("correlator-'dd'-'MM'-'yyyy'.log").
SetLogLevel
event SetLogLevel {
   string level;
}
Sets the log level of the logger. Only messages with a level equal or higher to the level are logged. The level field should be set to one of “FATAL”, “ERROR”, “WARN”, “INFO”, or “DEBUG”.
SetLogFormat
event SetLogFormat {
   string format;
}
Sets the text format to log messages. The format parameter can be either "normal" or "csv". The former specifies the regular format of logging messages, while the latter specifies a special comma-separated format. The comma-separated format is particularly useful for loading the logging output into a spreadsheet or database for further analysis.
SetDefaultLogFile
event SetDefaultLogFile {
}
Closes any currently open log file, deactivates log file rotation and directs subsequent log messages to the default log location — currently, “stdout“. The logging level is not changed by this event.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.