shithub: riscv

ref: 3a77c01f43821dcc4f7cae54aff89bb20f2d95a5
dir: /sys/src/cmd/upas/imap4d/debug.c/

View raw version
#include "imap4d.h"

char	logfile[28]	= "imap4";

void
debuglog(char *fmt, ...)
{
	char buf[1024];
	va_list arg;

	if(debug == 0)
		return;
	va_start(arg, fmt);
	vseprint(buf, buf + sizeof buf, fmt, arg);
	va_end(arg);
	syslog(0, logfile, "[%s:%d] %s", username, getpid(), buf);
}

void
ilog(char *fmt, ...)
{
	char buf[1024];
	va_list arg;

	va_start(arg, fmt);
	vseprint(buf, buf + sizeof buf, fmt, arg);
	va_end(arg);
	syslog(0, logfile, "[%s:%d] %s", username, getpid(), buf);

}