/*
 * Beans Common Source
 *
 * Tom Coppeto
 * MIT Network Group
 * 25 December 1997
 *
 * $Source: $
 * $Author: $
 * $Locker:  $
 */

#ifndef lint
static char *rcsid="$Header: $";
#endif /* lint */

#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
#include <syslog.h>

#include <beans.h>

  
void logmsg(int level, char *error, char *message, ...) {
	va_list ap;
	struct log *l;
	unsigned long t;
	char buf[BUFSIZ];
	
	va_start(ap,message);
	vsprintf(buf, message, ap);
	syslog(level, "%s%s%s", buf, error&&*error?": ":"", 
	       error&&*error?error:"");
	va_end(ap);

	return;
}
 


/*
 * Local Variables:
 * c-indent-level: 8
 * c-argdecl-indent: 8
 * c-continued-statement-offset: 8
 * c-continued-brace-offset: -8
 * c-label-offset: -8
 * c-brace-offset: -8
 * End:
 */
