| logging | language | logging |
logging -- Using the CL logging features
The CL has some simple logging features to allow the recording of events of interactive sessions. From these saved event logs, one can trace a particular data analysis sequence, track errors in programs, and create new CL scripts. Other uses for the logfile exist as well.
There are currently five types of logging messages, with a parameter to control what is actually logged. These include:
commands - commands and keystrokes of an interactive session
background - messages about and from background jobs
errors - logging of error messages
trace - start/stop trace of script and executable tasks
user - user messages, via the \fIputlog\fR builtin
All of these types of messages except the interactive commands will show up as comments (i.e., starting with a #) in the logfile. This facilitates using a previous logfile as input to the CL or as the basis for a script task.
The CL parameters discussed below are used to control the logging features. These parameters can be set on the command line, in the "login.cl" file, or with the command "eparam cl".
Logmode controls what goes into the logfile. The following options are currently available:
1. Turn all the logging features on except for background logging:
cl> logmode = "commands nobackground errors trace"
Background logging to the same logfile can cause problems. The environment variable filewait should be set to `no' to avoid file access conflicts. Even with this, reliability is not guaranteed and some messages will not get into the logfile.