Deploying and Managing Apama Applications > Event Correlator Utilities Reference > Replaying an input log to diagnose problems > Command line examples for creating an input log
Command line examples for creating an input log
The following command starts a correlator and specifies that the name of the input log is input.log.
correlator -l license.txt --inputLog input.log
Suppose that the correlator processes events for a while, sends information to input.log, and then you find that you need to restart the correlator. If you restart the correlator and specify the exact same command line, the correlator overwrites the first input.log file. To avoid overwriting an input log, specify ${START_TIME} when you start the correlator. For example:
correlator -l license.txt  --inputLog input_${START_TIME}.log
This command opens an input log with a name something like the following:
input_2014-07-12_15:12:23.156.log
This ensures that the correlator does not overwrite an input log file. Now suppose that you want to be able to rotate the input log, so you specify the ${START_TIME} and ${ID} tags:
correlator -l license.txt  --inputLog input_${START_TIME}_${ID}.log
This command opens an input log with a name something like the following:
input_2014-07-12_15:12:23.156_001.log
If you then rotate the input log, the correlator closes that file and opens a new file called
input_2014-07-12_15:12:23.156_002.log.
UNIX Note
In most UNIX shells, when you start a correlator you most likely need to escape the tag symbols, like this:
correlator -l license --inputLog input_\${START_TIME}_\${ID}.log
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.