#include <evlog.h> int log_write_any( const logd_t logdes, const log_facility_t facility, const int event_id, const log_severity_t severity, const void *buf, const size_t len );
A successful call to log_write_any()
returns a value of zero
and an unsuccessful call returns the errno
.
logdes
argument is not a valid log descriptor.
facility
argument is not a valid log facility.
severity
argument exceeds LOG_SEVERITY_MAX
.
len
argument exceeds LOG_MAXIMUM_BUFFER_SIZE
.
len
argument was non-zero and buf
is NULL
.
The log_write_any()
function writes an event record to the log file
specified by logdes
. The event record written consists of the
event attributes specified by the facility
, event_id
,
and severity
arguments as well as the data identified by the
buf
and len
arguments. The fields of the event record
structure to be written are filled in as follows:
len
argument.
event_id
argument.
facility
argument.
severity
argument.
geteuid()
.
getegid()
.
getpid()
.
getpgrp()
.
clock_gettime()
for the
CLOCK_REALTIME
clock source.
The _POSIX_LOGGING
feature flag is defined to indicate
this service is available.
This implementation can not return the EPERM
error.
This function is not defined in the POSIX specification. It is an extension provided by this implementation.
Copyright © 1988-2004 OAR Corporation