Deploying and Managing Apama Applications > Event Correlator Utilities Reference > Using a replay log to diagnose problems > Command line examples for creating a replay log
Command line examples for creating a replay log
The following command starts a correlator and specifies that the name of the replay log is replay.log.
correlator -l license.txt --replayLog replay.log
Suppose that the correlator processes events for a while, sends information to replay.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 replay.log file. To avoid overwriting a replay log, specify ${START_TIME} when you start the correlator. For example:
correlator -l license.txt  --replayLog replay_${START_TIME}.log
This command opens a replay log with a name something like the following:
replay_2008-07-12_15:12:23.156.log
This ensures that the correlator does not overwrite a replay log file. Now suppose that you want to be able to rotate the replay log, so you specify the ${START_TIME} and ${ID} tags:
correlator -l license.txt  --replayLog replay_${START_TIME}_${ID}.log
This command opens a replay log with a name something like the following:
replay_2008-07-12_15:12:23.156_001.log
If you then rotate the replay log, the correlator closes that file and opens a new file called
replay_2008-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 --replayLog replay_\${START_TIME}_\${ID}.log
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.