RTEMS Logo

RTEMS 4.6.2 On-Line Library


Event Logging Manager log_write_entry - Write entry to any log file

PREV UP NEXT Bookshelf New Chapters

1.4.3: log_write_entry - Write entry to any log file

CALLING SEQUENCE:

#include <evlog.h>

int log_write_entry(
  const logd_t      logdes,
  struct log_entry *entry,
  const void       *buf,
  const size_t      len
);

STATUS CODES:

A successful call to log_write_entry() returns a value of zero and an unsuccessful call returns the errno.

E2BIG
This error indicates an inconsistency in the implementation. Report this as a bug.
EBADF
The logdes argument is not a valid log descriptor.
EFAULT
The entry argument is not a valid pointer to a log entry.
EINVAL
The facility field in entry is not a valid log facility.
EINVAL
The severity field in entry exceeds LOG_SEVERITY_MAX.
EINVAL
The len argument exceeds LOG_MAXIMUM_BUFFER_SIZE.
EINVAL
The len argument was non-zero and buf is NULL.
ENOSPC
The device which contains the log file has run out of space.
EIO
An I/O error occurred in writing to the log file.

DESCRIPTION:

The log_write_entry() function writes an event record specified by the entry, buf, and len arguments. Most of the fields of the event record pointed to by entry are left intact. The following fields are filled in as follows:

log_recid
This is set to a monotonically increasing log record id maintained by the system for this individual log file.
log_size
This is set to the value of the len argument.

This allows existing log entries from one log file to be written to another log file without destroying the logged information.

NOTES:

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.


PREV UP NEXT Bookshelf New Chapters

Copyright © 1988-2004 OAR Corporation