92 lines
2.5 KiB
Plaintext
92 lines
2.5 KiB
Plaintext
.if n .pH ddi.rm/d3/gen/strlog @(#)strlog 43.12 of 11/27/92
|
|
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
|
|
.TH strlog D3
|
|
.IX "\f4strlog\fP(D3)"
|
|
.SH NAME
|
|
\f4strlog\f1 \- submit messages to the \f4log\f1 driver
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.na
|
|
.ft 4
|
|
#include <sys/types.h>
|
|
#include <sys/stream.h>
|
|
#include <sys/strlog.h>
|
|
#include <sys/log.h>
|
|
#include <sys/ddi.h>
|
|
.sp 0.4
|
|
int strlog(short \f2mid\fP, short \f2sid\fP, char \f2level\fP, ushort_t \f2flags\fP,
|
|
char *\f2fmt\fP, ... /* args */);
|
|
.ft 1
|
|
.ad
|
|
.fi
|
|
.SS Arguments
|
|
.RS 0
|
|
.IP "\f2mid\f1" 10n
|
|
Identification number of the module or driver submitting the message.
|
|
.IP "\f2sid\f1" 10n
|
|
Identification number for a particular minor device.
|
|
.IP "\f2level\f1" 10n
|
|
Tracing level for selective screening of low priority messages.
|
|
.IP "\f2flags\f1" 10n
|
|
Bitmask of flags indicating message purpose.
|
|
.IP "\f2fmt\f1" 10n
|
|
\f4printf\f1(3S) style format string.
|
|
.IP "\f2args\f1" 10n
|
|
Zero or more arguments to \f4printf\f1.
|
|
.RE
|
|
.SH DESCRIPTION
|
|
\f4strlog\f1 submits formatted messages to the \f4log\f1(7) driver.
|
|
The messages can be retrieved with the \f4getmsg\f1(2) system call.
|
|
The \f2flags\f1 argument specifies the type of the message and where it is to be sent.
|
|
\f4strace\f1(1M) receives messages from the \f4log\f1 driver and
|
|
sends them to the standard output.
|
|
\f4strerr\f1(1M) receives error messages from the \f4log\f1 driver
|
|
and appends them to a file called \f4/var/adm/streams/error.\fP\f2mm-dd\fP,
|
|
where \f2mm-dd\f1 identifies the date of the error message.
|
|
.SS "Return Values"
|
|
\f4strlog\f1 returns \f40\f1 if the message is not seen by all the readers,
|
|
\f41\f1 otherwise.
|
|
.SH USAGE
|
|
.SS "flags Argument"
|
|
Valid values for \f2flags\fP are:
|
|
.RS
|
|
.TP 14
|
|
\f4SL_ERROR\f1
|
|
Message is for error logger.
|
|
.TP
|
|
\f4SL_TRACE\f1
|
|
Message is for tracing.
|
|
.TP
|
|
\f4SL_CONSOLE\f1
|
|
Message is for console logger.
|
|
.TP
|
|
\f4SL_NOTIFY\f1
|
|
If \f4SL_ERROR\fP is also set, mail copy of message to system administrator.
|
|
.TP
|
|
\f4SL_FATAL\f1
|
|
Modifier indicating error is fatal.
|
|
.TP
|
|
\f4SL_WARN\f1
|
|
Modifier indicating error is a warning.
|
|
.TP
|
|
\f4SL_NOTE\f1
|
|
Modifier indicating error is a notice.
|
|
.RE
|
|
.SS "fmt Argument"
|
|
The \f4%s\f1, \f4%e\f1, \f4%g\f1, and \f4%G\f1 formats are not allowed.
|
|
.SS "printf args"
|
|
\f4args\fP can specify a maximum of \f4NLOGARGS\fP, currently three.
|
|
.SS Level
|
|
Base or Interrupt.
|
|
.SS "Synchronization Constraints"
|
|
Does not sleep.
|
|
.P
|
|
Driver-defined basic locks, read/write locks, and sleep locks
|
|
may be held across calls to this function.
|
|
.SH REFERENCES
|
|
.na
|
|
\f4log\fP(7),
|
|
\f4strace\fP(1M),
|
|
\f4strerr\fP(1M)
|
|
.ad
|