diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2004-02-19 09:54:53 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2004-02-19 09:54:53 +0000 |
commit | 9fa68f96f3cdb48bc170c5e764b64478eec5dad2 (patch) | |
tree | 70c1d367542d9d3e17ddd17691c04f4c59a36382 /sbin/isakmpd/log.c | |
parent | db4804f757157bc2ccbc195891c18b0d2986f492 (diff) |
With -d, SIGINT should do a clean shutdown.
Without -d, logs should be sent to syslog, level LOG_INFO.
Diffstat (limited to 'sbin/isakmpd/log.c')
-rw-r--r-- | sbin/isakmpd/log.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sbin/isakmpd/log.c b/sbin/isakmpd/log.c index ef6181576aa..419512709b5 100644 --- a/sbin/isakmpd/log.c +++ b/sbin/isakmpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.38 2004/01/16 10:51:57 hshoexer Exp $ */ +/* $OpenBSD: log.c,v 1.39 2004/02/19 09:54:52 ho Exp $ */ /* $EOM: log.c,v 1.30 2000/09/29 08:19:23 niklas Exp $ */ /* @@ -100,9 +100,12 @@ static u_int16_t in_cksum (const u_int16_t *, int); #endif /* USE_DEBUG */ void -log_init (void) +log_init (int debug) { - log_output = stderr; + if (debug) + log_output = stderr; + else + log_to (0); /* syslog */ } void @@ -209,7 +212,7 @@ log_debug (int cls, int level, const char *fmt, ...) if (cls >= 0 && (log_level[cls] == 0 || level > log_level[cls])) return; va_start (ap, fmt); - _log_print (0, LOG_DEBUG, fmt, ap, cls, level); + _log_print (0, LOG_INFO, fmt, ap, cls, level); va_end (ap); } |