diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-04 22:09:03 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2007-11-04 22:09:03 +0000 |
commit | 19bdb08eae263e3f0224a6f78b4909da07e34cce (patch) | |
tree | 4c7beae446cfd20888b9b51e17bfa9f2f07120fb /usr.sbin/hoststated | |
parent | fdfdf2ddde5ee06c71fc2122df17b08b36b7895d (diff) |
the last change to enable logging to stderr on startup also enabled
annoying debugging messages on the console by default. since we do
not want to see debugging messages unless specified by the "-d" flag,
add an extra debugging level "debug > 1" to be checked in log_debug().
Diffstat (limited to 'usr.sbin/hoststated')
-rw-r--r-- | usr.sbin/hoststated/hoststated.c | 6 | ||||
-rw-r--r-- | usr.sbin/hoststated/log.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/hoststated/hoststated.c b/usr.sbin/hoststated/hoststated.c index 89e21ae589f..4cc84a7f29f 100644 --- a/usr.sbin/hoststated/hoststated.c +++ b/usr.sbin/hoststated/hoststated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.c,v 1.46 2007/10/19 14:40:51 pyr Exp $ */ +/* $OpenBSD: hoststated.c,v 1.47 2007/11/04 22:09:02 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -133,7 +133,7 @@ main(int argc, char *argv[]) while ((c = getopt(argc, argv, "dD:nf:v")) != -1) { switch (c) { case 'd': - debug = 1; + debug = 2; break; case 'D': if (cmdline_symset(optarg) < 0) @@ -141,7 +141,7 @@ main(int argc, char *argv[]) optarg); break; case 'n': - debug = 1; + debug = 2; opts |= HOSTSTATED_OPT_NOACTION; break; case 'f': diff --git a/usr.sbin/hoststated/log.c b/usr.sbin/hoststated/log.c index 5b7257a0d09..44724696450 100644 --- a/usr.sbin/hoststated/log.c +++ b/usr.sbin/hoststated/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.7 2007/09/07 07:52:14 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.8 2007/11/04 22:09:02 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -138,7 +138,7 @@ log_debug(const char *emsg, ...) { va_list ap; - if (debug) { + if (debug > 1) { va_start(ap, emsg); vlog(LOG_DEBUG, emsg, ap); va_end(ap); |