HPlogo User Logging Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 5 User Logging in an Application

Using the OPENLOG Intrinsic

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The OPENLOG intrinsic provides access to the User Logging facility. When an application calls OPENLOG for a currently running logging process, the logging process builds the data structures which are necessary to allow the application to record data in the logfile, and a record is written to the logfile identifying the application. If the logid is not valid or the specified User Logging process is not running, an error will be returned.

The identification information in the OPENLOG record can be used, by the recovery program, to identify the records in the logfile, which belong to the process it is trying to recover. In order for the identification information to be useful for recovery, the application must retain some information of its own, particularly if the logfile will be accessed by more than one user process.

It is recommended that the application have a separate file to record such information as: user, group, and account which is accessing the logfile (this can be obtained with the WHO intrinsic); the pin# of the process accessing the logfile (this can be obtained with the GETPROCID intrinsic); the fully qualified file name of the current logfile and the ASCII code of the logid (these can be obtained with the LOGINFO intrinsic); the date and time that the logfile was opened by the application (call the CALENDAR and CLOCK intrinsics immediately following a successful call to OPENLOG). How this information will be used will be explained in Chapter 6, "Recovery".

Feedback to webmaster