17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate * This module intercepts syslog() library calls and redirects their output
37c478bd9Sstevel@tonic-gate * to the standard output stream. For interactive testing.
47c478bd9Sstevel@tonic-gate *
57c478bd9Sstevel@tonic-gate * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
67c478bd9Sstevel@tonic-gate */
77c478bd9Sstevel@tonic-gate
87c478bd9Sstevel@tonic-gate #ifndef lint
97c478bd9Sstevel@tonic-gate static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
107c478bd9Sstevel@tonic-gate #endif
117c478bd9Sstevel@tonic-gate
127c478bd9Sstevel@tonic-gate #include <stdio.h>
137c478bd9Sstevel@tonic-gate
147c478bd9Sstevel@tonic-gate #include "mystdarg.h"
157c478bd9Sstevel@tonic-gate
167c478bd9Sstevel@tonic-gate /* openlog - dummy */
177c478bd9Sstevel@tonic-gate
187c478bd9Sstevel@tonic-gate /* ARGSUSED */
19*9455584cSIgor Kozhukhov void
openlog(name,logopt,facility)207c478bd9Sstevel@tonic-gate openlog(name, logopt, facility)
217c478bd9Sstevel@tonic-gate char *name;
227c478bd9Sstevel@tonic-gate int logopt;
237c478bd9Sstevel@tonic-gate int facility;
247c478bd9Sstevel@tonic-gate {
257c478bd9Sstevel@tonic-gate /* void */
267c478bd9Sstevel@tonic-gate }
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate /* vsyslog - format one record */
29*9455584cSIgor Kozhukhov void
vsyslog(severity,fmt,ap)307c478bd9Sstevel@tonic-gate vsyslog(severity, fmt, ap)
317c478bd9Sstevel@tonic-gate int severity;
327c478bd9Sstevel@tonic-gate char *fmt;
337c478bd9Sstevel@tonic-gate va_list ap;
347c478bd9Sstevel@tonic-gate {
357c478bd9Sstevel@tonic-gate char buf[BUFSIZ];
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gate vprintf(percent_m(buf, fmt), ap);
387c478bd9Sstevel@tonic-gate printf("\n");
397c478bd9Sstevel@tonic-gate fflush(stdout);
407c478bd9Sstevel@tonic-gate }
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gate /* syslog - format one record */
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gate /* VARARGS */
45*9455584cSIgor Kozhukhov void
VARARGS(syslog,int,severity)467c478bd9Sstevel@tonic-gate VARARGS(syslog, int, severity)
477c478bd9Sstevel@tonic-gate {
487c478bd9Sstevel@tonic-gate va_list ap;
497c478bd9Sstevel@tonic-gate char *fmt;
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gate VASTART(ap, int, severity);
527c478bd9Sstevel@tonic-gate fmt = va_arg(ap, char *);
537c478bd9Sstevel@tonic-gate vsyslog(severity, fmt, ap);
547c478bd9Sstevel@tonic-gate VAEND(ap);
557c478bd9Sstevel@tonic-gate }
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate /* closelog - dummy */
58*9455584cSIgor Kozhukhov void
closelog()597c478bd9Sstevel@tonic-gate closelog()
607c478bd9Sstevel@tonic-gate {
617c478bd9Sstevel@tonic-gate /* void */
627c478bd9Sstevel@tonic-gate }
63