diff options
Diffstat (limited to 'usr.sbin/ripd/log.c')
-rw-r--r-- | usr.sbin/ripd/log.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ripd/log.c b/usr.sbin/ripd/log.c index f91405608f2..c66b67838a5 100644 --- a/usr.sbin/ripd/log.c +++ b/usr.sbin/ripd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.2 2006/10/31 23:43:11 michele Exp $ */ +/* $OpenBSD: log.c,v 1.3 2009/11/02 20:28:49 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); |