strlog(D3)strlog(D3)NAMEstrlog - submit messages to the log driver
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/strlog.h>
#include <sys/log.h>
#include <sys/ddi.h>
int strlog(short mid, short sid, char level, ushort_t flags,
char *fmt, ... /* args */);
Arguments
mid Identification number of the module or driver submitting the
message.
sid Identification number for a particular minor device.
level Tracing level for selective screening of low priority messages.
flags Bitmask of flags indicating message purpose.
fmt printf(3S) style format string.
args Zero or more arguments to printf.
DESCRIPTIONstrlog submits formatted messages to the log(7) driver. The messages can
be retrieved with the getmsg(2) system call. The flags argument
specifies the type of the message and where it is to be sent. strace(1M)
receives messages from the log driver and sends them to the standard
output. strerr(1M) receives error messages from the log driver and
appends them to a file called /var/adm/streams/error.mm-dd, where mm-dd
identifies the date of the error message.
Return Values
strlog returns 0 if the message is not seen by all the readers, 1
otherwise.
USAGE
flags Argument
Valid values for flags are:
SL_ERROR Message is for error logger.
SL_TRACE Message is for tracing.
SL_CONSOLE Message is for console logger.
Page 1
strlog(D3)strlog(D3)
SL_NOTIFY If SL_ERROR is also set, mail copy of message to
system administrator.
SL_FATAL Modifier indicating error is fatal.
SL_WARN Modifier indicating error is a warning.
SL_NOTE Modifier indicating error is a notice.
fmt Argument
The %s, %e, %g, and %G formats are not allowed.
printf args
args can specify a maximum of NLOGARGS, currently three.
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
REFERENCESlog(7), strace(1M), strerr(1M)
Page 2