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/relayd | |
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/relayd')
-rw-r--r-- | usr.sbin/relayd/log.c | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/relayd/log.c b/usr.sbin/relayd/log.c index 5b7257a0d09..44724696450 100644 --- a/usr.sbin/relayd/log.c +++ b/usr.sbin/relayd/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); diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 8994572fbbb..6bba36e5200 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.46 2007/10/19 14:40:51 pyr Exp $ */ +/* $OpenBSD: relayd.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': |