*/
#include "includes.h"
-RCSID("$Id: log-server.c,v 1.12 2000/02/27 18:50:09 deraadt Exp $");
+RCSID("$Id: log-server.c,v 1.13 2000/03/28 20:26:21 markus Exp $");
#include <syslog.h>
#include "packet.h"
} else {
vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
}
- if (log_on_stderr)
+ if (log_on_stderr) {
fprintf(stderr, "%s\n", msgbuf);
- openlog(__progname, LOG_PID, log_facility);
- syslog(pri, "%.500s", msgbuf);
- closelog();
+ } else {
+ openlog(__progname, LOG_PID, log_facility);
+ syslog(pri, "%.500s", msgbuf);
+ closelog();
+ }
}