From d93fca6a7ab52f518d3e8aca1fc94139313b97ad Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 11 Feb 2005 19:21:47 +0000 Subject: new man pages --- man/man3/sysfatal.3 | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'man/man3/sysfatal.3') diff --git a/man/man3/sysfatal.3 b/man/man3/sysfatal.3 index 615e39f1..180a3406 100644 --- a/man/man3/sysfatal.3 +++ b/man/man3/sysfatal.3 @@ -1,12 +1,15 @@ .TH SYSFATAL 3 .SH NAME -sysfatal \- system error messages +syslog, sysfatal \- system error messages .SH SYNOPSIS .B #include .br .B #include .PP .B +void syslog(int cons, char *logname, char *fmt, ...) +.PP +.B void sysfatal(char *fmt, ...) .SH DESCRIPTION .I Sysfatal @@ -28,6 +31,30 @@ interface to process its arguments. If .B argv0 is null, it is ignored and the following colon and space are suppressed. +.PP +.I Syslog +logs messages in the file named by +.I logname +in the directory +.B \*9/log ; +the file must already exist and is opened append-only. +.I 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 +.IR print (2) +format +.I fmt +and any following arguments; +and a final newline. +If +.I cons +is set or the log file cannot be opened, the message is also printed +on the system console. +.I Syslog +can be used safely in multi-threaded programs. .SH SOURCE .B \*9/src/lib9/sysfatal.c .SH "SEE ALSO" -- cgit v1.2.3