summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/log.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-11-02 20:34:59 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-11-02 20:34:59 +0000
commitfc9e841952912943ca6495d7885058e4408462b0 (patch)
treeac1a244ccb559fa1a0d3b287522207708a9049b4 /usr.sbin/ldpd/log.c
parent8f153481f259a4035c7ff4f463838f93bcb6dceb (diff)
More IMSG_CTL_LOG_VERBOSE, still doing the same toggeling of log_debug().
Diffstat (limited to 'usr.sbin/ldpd/log.c')
-rw-r--r--usr.sbin/ldpd/log.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ldpd/log.c b/usr.sbin/ldpd/log.c
index 1e97d6f1a23..98c9c6a05f5 100644
--- a/usr.sbin/ldpd/log.c
+++ b/usr.sbin/ldpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.1 2009/06/01 20:59:45 michele Exp $ */
+/* $OpenBSD: log.c,v 1.2 2009/11/02 20:34:58 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);