<Var/Number> = The log file number that will be written to. If this does not exsist it will be created.
<Var/Number> = Set this value to [TRUE] / [FALSE], or their numerical equivalent of (1) / (0) respectivly. Or, a variable containing one of these values.
<Var/String> = The sprintf format to be used for the log entry.
<Value1 - 5> = What is to be inserted into the sprintf string <Var/String>.
Formats and writes text to an external file.
See write to logfile and sprintf for more information on the log file and the formatting respectively.
If logfile # = null, nothing at all will be written. This can be useful for debugging.
If append is [TRUE], then the value is added to the end of the log file.
If append is [FALSE], then the contents of the log file are replaced with <Value>.
Example:
The following might be used at the start of a 'Debug' log.
$playing.time = playing time
$fmt.playing.time = format time: $playing.time
write to logfile # 9999 append =[TRUE] printf: fmt = 'Debug started at playing time = %s', $fmt.playing.time, null, null, null, null
This would add the following message to the log file, 'Debug started at playing time = 12:34:56'. It would be 'added' due to 'append =[TRUE]'.
Command Location:
- »» Logbook Commands
- write to logfile #<Var/Number> append=<Var/Number> printf: fmt=<Var/String>, <Value>, <Value>, <Value>, <Value>, <Value>