Browse Source

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
OPENBSD_3_6
henning 20 years ago
parent
commit
be71ed5f08
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/usr.sbin/ntpd/log.c

+ 6
- 4
src/usr.sbin/ntpd/log.c View File

@ -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


Loading…
Cancel
Save