1999-03-14 17:13:19 +00:00
|
|
|
/*
|
|
|
|
* 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 */
|
|
|
|
|
2023-03-21 14:08:28 +00:00
|
|
|
void openlog(char *name, int logopt, int facility)
|
1999-03-14 17:13:19 +00:00
|
|
|
{
|
|
|
|
/* void */
|
|
|
|
}
|
|
|
|
|
|
|
|
/* vsyslog - format one record */
|
|
|
|
|
2023-03-21 14:08:28 +00:00
|
|
|
void vsyslog(int severity, char *fmt, va_list ap)
|
1999-03-14 17:13:19 +00:00
|
|
|
{
|
|
|
|
char buf[BUFSIZ];
|
|
|
|
|
|
|
|
vprintf(percent_m(buf, fmt), ap);
|
|
|
|
printf("\n");
|
|
|
|
fflush(stdout);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* syslog - format one record */
|
|
|
|
|
|
|
|
/* VARARGS */
|
|
|
|
|
2017-06-16 22:32:23 +00:00
|
|
|
void VARARGS(syslog, int, severity)
|
1999-03-14 17:13:19 +00:00
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
char *fmt;
|
|
|
|
|
|
|
|
VASTART(ap, int, severity);
|
|
|
|
fmt = va_arg(ap, char *);
|
|
|
|
vsyslog(severity, fmt, ap);
|
|
|
|
VAEND(ap);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* closelog - dummy */
|
|
|
|
|
2017-06-16 22:32:23 +00:00
|
|
|
void closelog()
|
1999-03-14 17:13:19 +00:00
|
|
|
{
|
|
|
|
/* void */
|
|
|
|
}
|