Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

strace(1M)

strerr(1M)

getmsg(2)

log(7)

module_info(9S)

strlog(9F)

NAME

strlog − submit messages to the log driver

SYNOPSIS

#include <sys/stream.h>
#include <sys/strlog.h>
#include <sys/log.h>
int strlog(short mid, short sid, char level
, unsigned short flags, char ∗fmt, unsigned arg1
, . . .);

ARGUMENTS

mid Identification number of the module or driver submitting the message (in the case of a module, its mi_idnum value from module_info(9S)). 

sid Identification number for a particular minor device. 

level Tracing level for selective screening of low priority messages.  Larger values imply less important information. 

flags Valid flag values are:

SL_ERROR Message is for error logger. 

SL_TRACE Message is for trace. 

SL_NOTIFY Mail copy of message to system administrator. 

SL_CONSOLE
Log message to console.

SL_FATAL Error is fatal. 

SL_WARN Error is a warning. 

SL_NOTE Error is a notice. 

fmt printf(3S) style format string.  %s, %e, %g, and %G formats are not allowed. 

arg1 Zero or more arguments to printf. 

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI). 

DESCRIPTION

strlog() submits formatted messages to the log(7) driver.  The messages can be retrieved with the getmsg(2) system call.  The flags argument specifies the type of the message and where it is to be sent.  strace(1M) receives messages from the log driver and sends them to the standard output.  strerr(1M) 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. 

RETURN VALUES

strlog() returns 0 if the message is not seen by all the readers, 1 otherwise. 

CONTEXT

strlog() can be called from user or interrupt context. 

SEE ALSO

strace(1M), strerr(1M), getmsg(2), log(7), module_info(9S)

SunOS 5.1 Writing Device Drivers
SunOS 5.1 STREAMS Programmer’s Guide

SunOS 5.1/SPARC  —  Last change: 11 Apr 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026