PDGuide - Viewing and Analyzing Error Log Entries
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
This chapter assumes that you have read the information and are familiar with the defined terms in Guide to Instrumenting Your Code.
This chapter describes error logging and the error log formatter that is used to format, display, and analyze error information.
When your program encounters an error, the FFSTProbe API records information about the error in the system error log.
This chapter refers to the following types of error logs:
- Active error log
- The name of the log that is currently used. When you suspend logging, the system will not write entries to the active error log.
- Default error log
- The system uses this log after you power on the system. The system assumes this log until you specify another log to work with.
- Current error log
- The error log that a user is currently working with.
What is an Error Record?
An error record is created by the system when an error in a system or application program triggers a probe in that program. Error records contain detailed information to help you diagnose the error. Error records are also called DET1 records. Records created by a back level logging system are called DET4 records.
What is a Control Record?
A control record is created by the system when you make changes to the way errors are logged. For example, when you suspend error logging or direct error logging to a new file, the system records that change in a control record. Control records are also called DET2 records. Control records are new for FFST technology and are not available in records created by a back level logging system.
Controlling Error Logs by Using the SYSLOG Command
Use the SYSLOG command and its various parameters to access the SYSLOG utility. If you do not specify parameters when you use the command, the system loads the active system error log and displays the SYSLOG Summary window (see Working with the Error Log and Controlling Error Logging). If the system cannot find the file name you requested, SYSLOG displays a message.
If logging is not active, an error message will be shown stating
"The OS/2 Logging Facility device driver LOG$ is not loaded. To activate logging enter DEVICE=\OS2\LOG.SYS and RUN=\OS2\SYSTEM\LOGDAEM.EXE in config.sys and reboot.
The available parameters of the SYSLOG command are as follows:
Parameter Action
- /V
- <error log pathname>
Use this parameter with the error log pathname to access the error log. If you specify no pathname, the system accesses the active error log.
/S:<error log pathname>
Use this parameter to suspend error logging. Note that when you use this parameter, the system writes an error log entry to the current active error log that indicates that you suspended logging.
/R:<error log pathname>
Use this parameter to resume error logging to the suspended file. If the system cannot find the pathname, the system does not resume logging. If the system finds the pathname but cannot find the error log file, the system creates the error log file and resumes logging. Note that when you use this parameter the system writes an error log entry to the current active error log that indicates that you resumed logging.
/P:<error log pathname>
Use this parameter to redirect error logging to another error log. Note that when you use this parameter the system writes an error log entry to the current active error log that indicates you redirected logging. The error log entry contains the pathname of the error log file that logging was directed from and the pathname of the error log file that logging was directed to.
/W:xx Use this parameter along with the /P parameter and the error log pathname to change the maximum size (xx) of the specified error log. The default size of the error log is 64 KB.
Viewing Error Log Contents by Using SYSLOG
Working with the Error Log and Controlling Error Logging
File Choices Edit Choices View Choices Refresh Now Header Error Details Search Choice All Records Active Log Name Action Choices Suspend/Activate Logging Redirect Logging Change Log Size Displaying Error Log Entry Data
Accessing Error-Log Information through Functions
Event Notification
Remote Error Reporting
Building and Sending an Indication