'\"macro stdmacro
.if n .pH ddi_dki.strlog @(#)strlog	40.10 of 11/20/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} strlog D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} strlog D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} strlog D3DK "" "\&"
.if \nX=3 .ds x} strlog "" "" "\&"
.TH \*(x}
.IX "\f4strlog\fP(D3DK)"
.SH NAME
\f4strlog\f1 \- submit messages to the \f4log\f1 driver
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
\f4#include <sys/strlog.h>
\f4#include <sys/log.h>
.sp 0.5
int strlog(short \f2mid, \f4short \f2sid, \f4char \f2level, \f4unsigned short \f2flags,
	\f4char *\f2fmt, \f4unsigned\f2 arg1, . . .\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n 10
.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
Valid flag values are:
.RS 15n
.TP 12
\f4SL_ERROR\f1
Message is for error logger.
.PD 0
.TP
\f4SL_TRACE\f1
Message is for trace.
.TP
\f4SL_NOTIFY\f1
Mail copy of message to system administrator.
.TP
\f4SL_CONSOLE\f1
Log message to console.
.TP
\f4SL_FATAL\f1
Error is fatal.
.TP
\f4SL_WARN\f1
Error is a warning.
.TP
\f4SL_NOTE\f1
Error is a notice.
.PD
.RE
.IP "\f2fmt\f1" 10n
\f4printf\f1(3S) style format string.  \f4%s\f1,
\f4%e\f1, \f4%g\f1, and \f4%G\f1 formats are not allowed.
.IP "\f2arg1\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.\f2mm-dd\f1,
where \f2mm-dd\f1 identifies the date of the error message.
.SH RETURN VALUE
\f4strlog\f1 returns \f40\f1 if the message is not seen by all the readers,
\f41\f1 otherwise.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 12, ``Error Reporting''
.P
.na
\f4log\f1(7)
.ad
