Sync usage with man page.
[netbsd-mini2440.git] / usr.sbin / tcpdchk / fakelog.c
blob0c23ecc420d15d1201c7fa45f3fbe427252df4c6
1 /* $NetBSD: fakelog.c,v 1.4 2000/12/30 21:45:44 martin Exp $ */
3 /*
4 * This module intercepts syslog() library calls and redirects their output
5 * to the standard output stream. For interactive testing.
6 *
7 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
8 */
10 #include <sys/cdefs.h>
11 #ifndef lint
12 #if 0
13 static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
14 #else
15 __RCSID("$NetBSD: fakelog.c,v 1.4 2000/12/30 21:45:44 martin Exp $");
16 #endif
17 #endif
19 #include <stdio.h>
20 #include <syslog.h>
22 #include "mystdarg.h"
23 #include "percent_m.h"
25 /* openlog - dummy */
27 /* ARGSUSED */
29 void
30 openlog(name, logopt, facility)
31 const char *name;
32 int logopt;
33 int facility;
35 /* void */
38 /* vsyslog - format one record */
40 void
41 vsyslog(severity, fmt, ap)
42 int severity;
43 const char *fmt;
44 _BSD_VA_LIST_ ap;
46 char buf[BUFSIZ];
48 vprintf(percent_m(buf, fmt), ap);
49 printf("\n");
50 fflush(stdout);
53 /* syslog - format one record */
55 /* VARARGS */
57 void
58 syslog(int severity, const char *fmt, ...)
60 va_list ap;
62 va_start(ap, fmt);
63 vsyslog(severity, fmt, ap);
64 va_end(ap);
67 /* closelog - dummy */
69 void
70 closelog()
72 /* void */