TSTool / Command / StartLog
StartLog command (re)starts the log file.
It is useful to insert this command as the first command in a command file,
in order to persistently record the results of processing.
A useful standard is to name the log file the same as the command file, with an additional
and this convention is enforced by default.
A date or date/time can optionally be added to the log file name.
TSTool uses a startup log file in the
.tstool/NN/logs user files folder when the software starts,
NN is the TSTool major version.
Subsequently, all log messages will be written to the latest log file specified by
This allows, for example, log files to be created near the command file that was run.
If this behavior is not desirable, such as in automated testing,
ConfigureLogging command to disable the
The following dialog is used to edit the command and illustrates the command syntax.
StartLog Command Editor (see also the full-size image)
The command syntax is as follows:
|The name of the file to write. The extension of
.log will automatically be added, if not specified. Can be specified using
|None - must be specified.
|Maximum log file size in bytes, useful when the log file can be very large and the size needs to be restricted.
|No limit to file size.
|Indicates that a suffix will be added before the
.log extension, one of:
This is useful for automatically archiving logs corresponding to commands files, to allow checking the output at a later time. However, generating date/time stamped log files can increase the amount of disk space that is used.
See the automated tests.
A sample command file to process State of Colorado HydroBase data is as follows
Add command will generate an error because the units of the time series are incompatible):
# 06753400 - LONETREE CREEK AT CARR, CO.
# 1179 - BYERS 5 ENE