diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 11:00:29 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-09 11:00:29 +0000 |
commit | d61a1b46b021f08993bc618863d09e9de06cec82 (patch) | |
tree | df2973ca6dd71c0e8e3e40cf9a8951d97a0c7eb5 /usr.sbin/bgpd | |
parent | 58689340b3b38b3cdbc56ca997d9d709dc15493d (diff) |
let log_debug only log at all when we're in debug mode, from Montreal Airport
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/log.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index 4f28a9b8a3c..bfd1cbdc1b1 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.38 2004/06/01 20:27:24 henning Exp $ */ +/* $OpenBSD: log.c,v 1.39 2004/07/09 11:00:28 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -199,9 +199,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 |