mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
2aef693010
Rest of build to follow.
63 lines
992 B
C
63 lines
992 B
C
/*
|
|
* This module intercepts syslog() library calls and redirects their output
|
|
* to the standard output stream. For interactive testing.
|
|
*
|
|
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
|
*/
|
|
|
|
#ifndef lint
|
|
static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17:42:21";
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "mystdarg.h"
|
|
|
|
/* openlog - dummy */
|
|
|
|
/* ARGSUSED */
|
|
|
|
openlog(name, logopt, facility)
|
|
char *name;
|
|
int logopt;
|
|
int facility;
|
|
{
|
|
/* void */
|
|
}
|
|
|
|
/* vsyslog - format one record */
|
|
|
|
vsyslog(severity, fmt, ap)
|
|
int severity;
|
|
char *fmt;
|
|
va_list ap;
|
|
{
|
|
char buf[BUFSIZ];
|
|
|
|
vprintf(percent_m(buf, fmt), ap);
|
|
printf("\n");
|
|
fflush(stdout);
|
|
}
|
|
|
|
/* syslog - format one record */
|
|
|
|
/* VARARGS */
|
|
|
|
VARARGS(syslog, int, severity)
|
|
{
|
|
va_list ap;
|
|
char *fmt;
|
|
|
|
VASTART(ap, int, severity);
|
|
fmt = va_arg(ap, char *);
|
|
vsyslog(severity, fmt, ap);
|
|
VAEND(ap);
|
|
}
|
|
|
|
/* closelog - dummy */
|
|
|
|
closelog()
|
|
{
|
|
/* void */
|
|
}
|