diff options
Diffstat (limited to 'usr.sbin/ospfd/log.c')
-rw-r--r-- | usr.sbin/ospfd/log.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/log.c b/usr.sbin/ospfd/log.c index ebba51eb84b..e8326b81d45 100644 --- a/usr.sbin/ospfd/log.c +++ b/usr.sbin/ospfd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.5 2006/03/09 16:58:40 claudio Exp $ */ +/* $OpenBSD: log.c,v 1.6 2009/11/02 20:20:54 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -34,6 +34,7 @@ static const char * const procnames[] = { }; int debug; +int verbose; void logit(int, const char *, ...); @@ -43,6 +44,7 @@ log_init(int n_debug) extern char *__progname; debug = n_debug; + verbose = n_debug; if (!debug) openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON); @@ -51,6 +53,12 @@ log_init(int n_debug) } void +log_verbose(int v) +{ + verbose = v; +} + +void logit(int pri, const char *fmt, ...) { va_list ap; @@ -128,7 +136,7 @@ log_debug(const char *emsg, ...) { va_list ap; - if (debug) { + if (verbose) { va_start(ap, emsg); vlog(LOG_DEBUG, emsg, ap); va_end(ap); |