Apama Documentation : 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:
*Correlator status log file. Upon correlator startup, the default behavior is that the correlator logs status information to stdout. To send correlator status 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 the correlator log file.
*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 the log filename, consider the rotation policy for your input log files. See Rotating an input log file.
*Application 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 status logs and input logs. For details about how to create application log files, see Setting logging attributes for packages, monitors and events.
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 the correlator log file 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.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback