log

Syntax: LOG (Screen or filename or Off)

What it does: Sends the log of events to the specified location.

  • Screen - Sends output to the screen
  • filename - Sends output to a file. If a file named filename does not exist, it is created; otherwise, it is opened for appending and logging output is written to this file. (If LOG is later redirected to the screen or turned off, the file is closed and no more information is written to it.)
  • Off - Turns off output of LOG information.
Note: This command is most effective when used at the very beginning of a new script; it provides information that is extremely useful in getting a script up and running.