aboutsummaryrefslogtreecommitdiff
path: root/man/man3/sysfatal.3
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-02-11 19:21:47 +0000
committerrsc <devnull@localhost>2005-02-11 19:21:47 +0000
commitd93fca6a7ab52f518d3e8aca1fc94139313b97ad (patch)
treeb2c26f27a62a45314add2905be70f1c0385c4e19 /man/man3/sysfatal.3
parent7442c7ac4b30dd1945d00516931f548d65d3d814 (diff)
downloadplan9port-d93fca6a7ab52f518d3e8aca1fc94139313b97ad.tar.gz
plan9port-d93fca6a7ab52f518d3e8aca1fc94139313b97ad.tar.bz2
plan9port-d93fca6a7ab52f518d3e8aca1fc94139313b97ad.zip
new man pages
Diffstat (limited to 'man/man3/sysfatal.3')
-rw-r--r--man/man3/sysfatal.329
1 files changed, 28 insertions, 1 deletions
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 <u.h>
.br
.B #include <libc.h>
.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"