Apama 10.15.0 | Deploying and Managing Apama Applications | Correlator Utilities Reference | Starting the correlator | Specifying log filenames
 
Specifying log filenames
A correlator can send information to the following log files:
*Main correlator log file. Upon correlator startup, the default behavior is that the correlator logs status information to stdout. To send this information to a file, specify the -f file or --logfile file option and replace file with a log filename. The format for specifying a log filename is described below.
Before you specify a log filename, you should consider your log rotation policy, which can determine what you want to specify for the log filename. See Rotating correlator log files.
*EPL log files. You can create log files for packages, monitors, and events in your application. The format you use to specify these log filenames is the same as for the main correlator log file. For details about how to create EPL log files, see Setting EPL log files and log levels in a YAML configuration file and Setting EPL log files and log levels dynamically.
*Correlator input log file. When you start a correlator, you can specify the --inputLog file option so that the correlator maintains a special log file for all inputs. Again, before you specify a log filename, you should consider the rotation policy for your input log files. See Rotating an input log file.
Note:
The correlator input log file is slightly different from the other log files, and it is not intended to be read by a human.
*Correlator configuration log file. When you start a correlator, you can specify the --configLog file option so that the correlator maintains a special log file for all of the correlator's configuration.
The format for specifying a log filename is as follows:
file[${START_TIME}][${ROTATION_TIME}][${ID}][${PID}].log
The following table describes each part of a log filename specification. You cannot include spaces. You can separate the parts of the filename specification with underscores. You can specify ${START_TIME}, ${ROTATION_TIME}, ${ID} and/or ${PID} in any order. For examples, see Examples for specifying log filenames.
Element
Description
file
Replace file with the name of the file that you want to be the log file. If you specify the name of a file that exists, the correlator overwrites it on Windows or appends to it on UNIX.
Required.
If you also specify ${START_TIME} and/or ${ROTATION_TIME} and/or ${ID} and/or ${PID}, the correlator prefixes the name you specify to the time the correlator was started and/or the time the log file was rotated (logging to a new file began) and/or an ID beginning with 001 and/or the process ID.
Be sure to specify a location that allows fast access.
${START_TIME}
Tag that indicates that you want the correlator to insert the date and time that it started into the log filename.
Optional, however you probably want to always specify either this option or ${ROTATION_TIME} to avoid overwriting log files.
${ROTATION_TIME}
Tag that indicates that you want the correlator to insert the date and time that it starts sending messages to a new log file into the log filename.
Optional.
If you specify ${ROTATION_TIME} and this log filename specification appears in a correlator start-up command then the name of the initial log file contains the time the correlator started.
${ID}
Tag that indicates that you want the correlator to insert a three-digit ID into the log filename. The ID that the correlator inserts first is 001.
Optional. The log ID increment is related only to rotation of log files. See Rotating correlator log files and Rotating an input log file.
The ID allows you to create a sequence of log files. Each time the log file is rotated, the correlator increments the ID. A sequence of log files have the same name except for the ID. If you also specify ${ROTATION_TIME} then a sequence of log files have the same name except for the rotation time and the ID.
Restarting the correlator always resets the ID portion of the log filename to 001.
${PID}
Tag that indicates that you want the correlator to insert the process ID into the log file name.
Optional.
The process ID will be constant for the lifetime of the process. Therefore, if you start multiple processes with the same arguments, they get different file names.
If you plan to rotate log files then be sure to specify ${ROTATION_TIME} or ${ID}. You can also specify both.