strlog man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

STRLOG(9F)							    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, ...);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/DKI).

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

       sid
		Identification number for a particular minor device.

       level
		Tracing	 level	for  selective	screening of low priority mes‐
		sages. 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(3C) style format string. %e, %g, and %G formats are not
		allowed but %s is supported.

DESCRIPTION
       The strlog() function expands the printf(3C) style format string passed
       to it, that is, the conversion specifiers are replaced  by  the	actual
       argument values in the format string. The 32-bit representations of the
       arguments (up to NLORGARGS) follow the  string  starting	 at  the  next
       32-bit  boundary	 following  the	 string. Note that the 64-bit argument
       will be truncated to 32-bits here but will be fully represented in  the
       string.

       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
       The strlog() function returns 0 if it fails to submit  the  message  to
       the log(7D) driver and 1 otherwise.

CONTEXT
       The  strlog()  function	can  be called from user, interrupt, or kernel
       context.

FILES
       /var/adm/streams/error.mm-dd

	   Error messages dated mm-dd appended	by  strerr(1M)	from  the  log
	   driver

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

       Writing Device Drivers

       STREAMS Programming Guide

				 Jan 16, 2006			    STRLOG(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net