|Powered by QM on a Rpi server|
KnowledgeBase 00063: Error Logging
This article was originally published as a Tip of the Week.
QM has the option to maintain an error log that will record events such as application errors. Items can also be written to this file from user applications. Regular examination of this file is recommended.
The Error Log File
The error log is a text file in the QMSYS account directory named errlog. All users should have read and write access to this file. Any user who does not have access will be unable to log messages.
Each entry in the log consists of a header line followed by one or more detail lines. The header shows:
For ease of mechanical processing, the detail lines are indented by three spaces.
Entries corresponding to application errors show the internal address at which the error occurred, details of the error and, where available, the line number and program name.
The ERRLOG Configuration Parameter
The ERRLOG configuration parameter sets the maximum size of the errlog file in kilobytes (minimum value 10). A value of zero turns off error logging.
When necessary, logged messages are removed from the start of the file to stay within the defined file size limit.
Logging Messages From Applications
The LOGMSG command and its corresponding QMBasic statement can be used in an application to write messages into the error log. This allows a single log file to cover all logging activities for the whole application.