Controls logging of interactive mode commands to a disk file.


comlog [[file=filename]] [[on|off|reset]]

filename (literal or ^string) –

The file=filename subcommand selects the file to log interactive mode statements to. This can be any legal file name.

If the name of the file is to be taken from a string variable, the name of the string must be preceded by the ^ (caret) operator.

There is no default file name.


  • comlog on turns on command logging to the current file. If the file already exists, subsequent commands will be appended.

  • comlog off closes the log file and turns off command logging.

  • comlog reset turns on command logging to the current log file, resetting the log file by deleting any previous commands.

  • Interactive mode statements are always logged into the file specified by the log_file configuration variable in the gauss.cfg file, regardless of the state of comlog.

  • The command comlog file= filename selects the file but does not turn on logging.

  • The command comlog off will turn off logging. The filename will remain the same. A subsequent comlog on will cause logging to resume. A subsequent comlog reset will cause the existing contents of the log file to be destroyed and a new file created.

  • The command comlog by itself will cause the name and status of the current log file to be printed in the window.