diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-08 01:19:28 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-08 01:19:28 +0000 |
commit | 661c15bcc70ef71f15747a84f79786c44a77271e (patch) | |
tree | f4e4b4dbd858bb50d0a5216130a2e209684616f2 /usr.sbin | |
parent | 84946159854fcf724fb39e4e6938ed1d644cc646 (diff) |
make log_debug() only log anything at all when we are in debug mode
before, it would log with LOG_DEBUG to syslog when !debug
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/log.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ntpd/log.c b/usr.sbin/ntpd/log.c index 57ecbb442c4..e621fdd911c 100644 --- a/usr.sbin/ntpd/log.c +++ b/usr.sbin/ntpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.3 2004/06/17 19:15:27 henning Exp $ */ +/* $OpenBSD: log.c,v 1.4 2004/07/08 01:19:27 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -129,9 +129,11 @@ log_debug(const char *emsg, ...) { va_list ap; - va_start(ap, emsg); - vlog(LOG_DEBUG, emsg, ap); - va_end(ap); + if (debug) { + va_start(ap, emsg); + vlog(LOG_DEBUG, emsg, ap); + va_end(ap); + } } void |