Error Logging |
![]() ![]() ![]() |
QM includes an error logging system that records brief details of errors that may require investigation by system administrators or application developers. These include:
The error log is maintained in a text file named errlog in the QMSYS directory. Although it can be written directly by programs using the sequential file processing statements, this should be avoided as the buffering used by these statements may result in lost messages. Application developers should use the QMBasic LOGMSG statement or the LOGMSG command if they wish to add their own messages to the log file.
To avoid faulty programs generating very large log files and to remove the need for file maintenance, the ERRLOG configuration parameter sets the maximum size in kilobytes to which the error log file may grow. When this size is reached, the first half of the data in the file is discarded. The minimum acceptable non-zero value of the ERRLOG configuration parameter is 10. A smaller value will be treated as 10. Setting the ERRLOG parameter to zero disables error logging.
Each log message consists of two lines of text. The first gives the date, time, QM user number, process id and login name of the user generating the error. The second line gives the actual message, indented by three spaces to make the file more readable. This format is easy to process using user written tools if required.
|