Update URL for Kerberos FAQ
[heimdal.git] / appl / popper / pop_log.c
blob3ae50196276bec54ab53ed3c4abb9c2d8a4be406
1 /*
2 * Copyright (c) 1989 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
7 #include <popper.h>
8 RCSID("$Id$");
11 * log: Make a log entry
14 int
15 pop_log(POP *p, int stat, char *format, ...)
17 char msgbuf[MAXLINELEN];
18 va_list ap;
20 va_start(ap, format);
21 vsnprintf(msgbuf, sizeof(msgbuf), format, ap);
23 if (p->debug && p->trace) {
24 fprintf(p->trace,"%s\n",msgbuf);
25 fflush(p->trace);
26 } else {
27 #ifdef KRB5
28 krb5_log(p->context, p->logf, stat, "%s", msgbuf);
29 #else
30 syslog (stat,"%s",msgbuf);
31 #endif
33 va_end(ap);
35 return(stat);