Logs an application error to the system error log.
Run-Time Services Library (librts.a)
#include <sys/errids.h>
int errlog ( ErrorStructure, Length)
void *ErrorStructure;
unsigned int Length;
The errlog subroutine writes an error log entry to the /dev/error file. The errlog subroutine is used by application programs.
The transfer from the err_rec structure to the error log is by a write subroutine to the /dev/error special file.
The errdemon process reads from the /dev/error file and writes the error log entry to the system error log. The timestamp, machine ID, node ID, and Software Vital Product Data associated with the resource name (if any) are added to the entry before going to the log.
Item | Description |
---|---|
ErrorStructure | Points to an error record structure containing an error record.
Valid error record structures are typed in the /usr/include/sys/err_rec.h file.
The two error record structures available are err_rec and err_rec0.
The err_rec structure is used when the detail_data field
is required. When the detail_data field is not required,
the err_rec0 structure is used. struct err_rec0 { The fields of the structures err_rec and err_rec0 are:
|
Length | Specifies the length in bytes of the err_rec structure, which is equal to the size of the error_id and resource_name fields plus the length in bytes of the detail_data field. |
Item | Description |
---|---|
0 | The entry was logged successfully. |
-1 | The entry was not logged. |
Item | Description |
---|---|
/dev/error | Provides standard device driver interfaces required by the error log component. |
/usr/include/sys/errids.h | Contains definitions for error IDs. |
/usr/include/sys/err_rec.h | Contains structures defined as arguments to the errsave kernel service and the errlog subroutine. |
/var/adm/ras/errlog | Maintains the system error log. |