Command Reference : Command Reference
Set the log settings of specified message types.
Activates or deactivates the logging of specified message types if message types are set to be program controlled.
Controls the output of the messages to a log window with a specified name and/or to a file on disk.
logmode(options) msgtype_list
where msgtype_list is a list of the message types to update.
Name of the message log and message log window. Default name is: PROGRAM_NAME.
Name of the message log file on disk to store the messages.
Turns on/off automatic saving of the message logs on disk.
Deletes the message log file (specified by filename option).
Clears the log window.
Makes the log window floating.
timestamp, ts
Adds a timestamp in front of the message.
Message type options
[Show/Do not show] all messages.
error/-error, e/-e
[Show/Do not show] error messages.
logmsg /-logmsg,
l/ -l
[Show/Do not show] logmsg messages.
program/-program, p/-p
[Show/Do not show] program lines.
statusline/-statusline, s / -s
[Show/Do not show] status line messages.
[Hide/Do not hide] the program line when reporting errors encountered during execution.
[Show/Do not show] messages generally appropriate for addin error reporting. addin is equivalent to the command and program mode ( “Program Modes”) statements:
logmode hideprogline -error
mode quiet
Show messages generally appropriate for debugging of programs. Equivalent to the command:
logmode -hideprogline error
Note that using logmode with debug will override all subsequent (in either the current program or any program run using exec or run), logmode with hideprog and -error specifications. In particular, debug will override subsequent logmode addin statements.
logmode p
turns on logging and directs the output to the window PROGRAM_NAME. Note that by default all message types are initially turned off.
logmode error -p
Building on the first command, this activates the logging of errors and deactivates the logging of program lines. The error messages will be displayed on a window with name PROGRAM_NAME.
logmode -all s
turns off logging of all types, with the exception of status line messages. The status line messages will be displayed on a window with name PROGRAM_NAME. Note the order of message types is important. For example,
logmode p -all
will initially activate the logging of program lines, but following p with -all will deactivate program lines as well as any other messages that have been previously activated. The program lines will be displayed in a window with name PROGRAM_NAME
logmode(name="firstrun") l
turns on logging of logmsg messages and outputs the messages on a window with name FIRSTRUN.
logmode(name="") l
Building on the previous command, this will no longer output the messages on the window with name FIRSTRUN, but instead on a window with name PROGRAM_NAME.
logmode(name="secondrun", filename="c:\myfile.txt", autosave=on)
turns on logging, sends the output to the window SECONDRUN, and writes the messages to a file with name myFile.txt.
logmode(name="thirdrun", clear, ts, float, autosave=off)
directs messages to a window with name THIRDRUN, clears the window, adds a timestamp to all messages, makes the window floating, and turns off the autosave.
logmode(name="fourthrun", autosave=on )
turns on logging, sends messages to a window with name fourthrun, and writes messages to a file with name program_name.txt
See “Program Message Logging” for details. See also “Program Modes”.
See also logclear, logmsg, logclose, and logsave.