poll - Fix events == 0 handling for TAP and TUN, fix console spam
[dragonfly.git] / contrib / tcp_wrappers / fakelog.c
blob25c69c39ddb028f584a808ebeeb8af114ef55382
1 /*
2 * This module intercepts syslog() library calls and redirects their output
3 * to the standard output stream. For interactive testing.
4 *
5 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
6 */
8 #include <stdarg.h>
9 #include <stdio.h>
11 extern char *percent_m();
13 /* openlog - dummy */
15 /* ARGSUSED */
17 void
18 openlog(name, logopt, facility)
19 char *name;
20 int logopt;
21 int facility;
23 /* void */
26 /* vsyslog - format one record */
28 void
29 vsyslog(severity, fmt, ap)
30 int severity;
31 char *fmt;
32 va_list ap;
34 char buf[BUFSIZ];
36 vprintf(percent_m(buf, fmt), ap);
37 printf("\n");
38 fflush(stdout);
41 /* syslog - format one record */
43 /* VARARGS */
45 void
46 syslog(int severity, const char *fmt, ...)
48 va_list ap;
50 va_start(ap, fmt);
51 vsyslog(severity, fmt, ap);
52 va_end(ap);
55 /* closelog - dummy */
57 void
58 closelog()
60 /* void */