.TH strlog() "" "" "DDI/DKI Kernel Routine"
.PC "Submit messages to the log driver"
.B "#include <sys/log.h>"
.B "#include <sys/stream.h>"
.B "#include <sys/strlog.h>"
.B "#include <sys/types.h>"
\fBint strlog(\fImodule\^\fB, \fIminor\^\fB, \fIlevel\^\fB, \fIflags\^\fB, \fIformat\^\fB, ...)\fR
\fBshort \fImodule\^\fB, \fIminor\^\fB; char \fIlevel\^\fB, *\fIformat\^\fB; uchar_t \fIflags\^\fB;\fR
.PP
.B strlog()
submits formatted messages to the
.B log
driver.
It returns zero if the message is not seen by all the readers, or one if it is.
The messages can be retrieved by the \*(CO system call
.BR getmsg() .
.PP
.I module
identifies the module or driver that submitted the message.
.I minor
identifies the minor device in question.
.PP
.I flags
is a bitmask of flags that indicate the purpose of the message.
.B strlog()
recognizes the following values for this argument:
.IP \fBSL_ERROR\fR 1.25i
Message is for the error logger.
.IS \fBSL_TRACE\fR
Message is for tracing.
.IS \fBSL_CONSOLE\fR
Message is for the console logger.
.IS \fBSL_NOTIFY\fR
Mail a copy of the error message to the system administrator.
.IS \fBSL_FATAL\fR
Error is fatal.
.IS \fBSL_WARN\fR
Error is a warning.
.IS \fBSL_NOTE\fR
Error is a notice.
.PP
.I format
is a \fBprintf()\fR-style formatting string.
The formats
.BR %s ,
.BR %e ,
.BR %g ,
and
.B %G
are not allowed.
For a detailed discussion of how to build a format string, see the
entry for
.B printf()
in the \*(CO Lexicon.
.PP
All subsequent arguments give variables.
The number of variables, and the type of each, is determined by the
.I format
string, as with the function
.BR printf() .
.SH "See Also"
.B
DDI/DKI kernel routines,
print
.R
.br
\*(CO Lexicon:
.B
getmsg(),
printf()
.R
.SH Notes
.B strlog()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
