Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SYSFATAL(3)		   Library Functions Manual		   SYSFATAL(3)

NAME
       syslog, sysfatal	- system error messages

SYNOPSIS
       #include	<u.h>
       #include	<libc.h>

       void syslog(int cons, char *logname, char *fmt, ...)

       void sysfatal(char *fmt,	...)

DESCRIPTION
       Sysfatal	 prints	 to  standard error the	name of	the running program, a
       colon and a space, the message described	by the print(3)	format	string
       fmt  and	 subsequent  arguments,	and a newline.	It then	calls exits(3)
       with the	formatted message as argument.	 The  program's	 name  is  the
       value of	argv0, which will be set if the	program	uses the arg(3)	inter-
       face to process its arguments.  If argv0	is null, it is ignored and the
       following colon and space are suppressed.

       Syslog  logs  messages  in  the	file named by logname in the directory
       /usr/local/plan9/log ; the file must already exist and  is  opened  ap-
       pend-only.   Logname  must  contain  no slashes.	 The message is	a line
       with several fields: the	name of	the machine writing the	 message;  the
       date and	time; the message specified by the print(3) format fmt and any
       following arguments; and	a final	newline.  If cons is set  or  the  log
       file  cannot  be	opened,	the message is also printed on the system con-
       sole.  Syslog can be used safely	in multi-threaded programs.

SOURCE
       /usr/local/plan9/src/lib9/sysfatal.c
       /usr/local/plan9/src/lib9/syslog.c

SEE ALSO
       intro(3), errstr(3), the	%r format in print(3)

								   SYSFATAL(3)

NAME | SYNOPSIS | DESCRIPTION | SOURCE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=sysfatal&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help