/log

Usage:

/LOG [-ligw[world]] [OFF|ON|file]


Enables or disables logging, or lists currently open log files. An [-ligw] option specifies which history is used; the [OFF|ON|file] argument specifies what action is taken on that history.

Options:

-wworld
Output from world only.
-w
Output from the current world.
-l
Local output (i.e., output generated by TF).
-i
Keyboard input.
-g
Global output (all worlds and local TF output).

Arguments:

OFF
Disable specified log, or all logs if unspecified.
ON
Log to ${LOGFILE}; -g is assumed if -ligw not given.
file
Log to file; -g is assumed if -ligw not given.
(none)
With no option, lists all open logs.
(none)
With an -ligw option, same as "ON".

When logging is enabled for a history, lines that are normally recorded in that history are also appended to the log file. The previously existing contents of the file, if any, are not affected.

It is possible to have multiple log files open simultaneously. It is also possible to have several types of output go to the same log file, by using several /log commands. For example,

  /log -i tt.log
  /log -wTT tt.log
  /log -g on
will send input from the keyboard and output from the world TT to the file "tt.log", and also send all (global) output to the file named by the LOGFILE macro.

The functions of the /logme command in older versions of TF can be performed with /log -i.

Wrapping will be done in the log file only if the %{wraplog} variable is "on".

Logging is disabled by default. The default value of ${LOGFILE} is "tiny.log".

See: %wraplog, history, nlog() fwrite()


Back to index
Back to tf home page
Copyright © 1995 - 1999 Ken Keys