SVR5 and SCO OpenServer 5
strlog(D3str)
strlog --
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 */);
Description
strlog submits formatted messages to the
log(7)
driver.
The messages can be retrieved with the
getmsg
system call.
The flags argument specifies
the type of the message and where it is to be sent.
strace
receives messages from the log driver and
sends them to the standard output.
strerr
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.
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.
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.
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-
fprintf
style format string.
The %s, %e, %g,
and %G formats are not allowed.
args-
Zero or more arguments to printf.
args can specify a maximum of NLOGARGS,
currently three,
for both DDI and ODDI drivers.
The format string should contain no more than 1012 characters.
Return values
strlog returns 0
if the message is not seen by all the readers,
1 otherwise.
Usage
Context
Base or Interrupt.
Synchronization constraints
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
Hardware applicability
All
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi:
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
References
log,
strace,
strerr
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005