Powered by QM on a Linux server
Help and Support

KnowledgeBase 00063: Error Logging

Last updated: 27 Dec 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

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:

  • The date and time of the entry. For multi-timezone applications this is recorded in the timezone of the server which may differ from that of the user process that caused the entry to be logged.
  • The QM user number of the process creating the log entry.
  • The operating system process id of the QM process.
  • The username of the QM process.
  • The account name in which the process is operating.

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.

Related Articles


Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)