2 .\" Copyright (c) 2006, Sun Microsystems, Inc.
3 .\" All Rights Reserved.
4 .\" Copyright 2006 AT&T
5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
8 .TH STRLOG 9F "Jan 16, 2006"
10 strlog \- submit messages to the log driver
14 #include <sys/stream.h>
15 #include <sys/strlog.h>
20 \fBint\fR \fBstrlog\fR(\fBshort\fR \fImid\fR, \fBshort\fR \fIsid\fR, \fBchar\fR \fIlevel\fR,
21 \fBunsigned short\fR \fIflags\fR, \fBchar *\fR\fIfmt\fR, ...);
27 Architecture independent level 1 (DDI/DKI).
35 Identification number of the module or driver submitting the message (in the
36 case of a module, its \fBmi_idnum\fR value from \fBmodule_info\fR(9S)).
45 Identification number for a particular minor device.
54 Tracing level for selective screening of low priority messages. Larger values
55 imply less important information.
64 Valid flag values are:
71 Message is for error logger.
89 Mail copy of message to system administrator.
95 \fB\fBSL_CONSOLE\fR\fR
98 Log message to console.
136 \fBprintf\fR(3C) style format string. \fB%e\fR, \fB%g\fR, and \fB%G\fR formats
137 are not allowed but \fB%s\fR is supported.
143 The \fBstrlog()\fR function expands the \fBprintf\fR(3C) style format string
144 passed to it, that is, the conversion specifiers are replaced by the actual
145 argument values in the format string. The 32-bit representations of the
146 arguments (up to \fBNLORGARGS\fR) follow the string starting at the next 32-bit
147 boundary following the string. Note that the 64-bit argument will be truncated
148 to 32-bits here but will be fully represented in the string.
151 The messages can be retrieved with the \fBgetmsg\fR(2) system call. The
152 \fIflags\fR argument specifies the type of the message and where it is to be
153 sent. \fBstrace\fR(1M) receives messages from the \fBlog\fR driver and sends
154 them to the standard output. \fBstrerr\fR(1M) receives error messages from the
155 \fBlog\fR driver and appends them to a file called
156 \fB/var/adm/streams/error.\fR\fImm-dd\fR, where \fImm-dd\fR identifies the date
157 of the error message.
161 The \fBstrlog()\fR function returns \fB0\fR if it fails to submit the message
162 to the \fBlog\fR(7D) driver and \fB1\fR otherwise.
166 The \fBstrlog()\fR function can be called from user, interrupt, or kernel
172 \fB\fB/var/adm/streams/error.\fR\fImm-dd\fR\fR
176 Error messages dated \fImm-dd\fR appended by \fBstrerr\fR(1M) from the
183 \fBstrace\fR(1M), \fBstrerr\fR(1M), \fBgetmsg\fR(2), \fBlog\fR(7D),
184 \fBmodule_info\fR(9S)
187 \fIWriting Device Drivers\fR
190 \fISTREAMS Programming Guide\fR