summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2007-11-04 22:09:02 +0000
committerreyk <reyk@openbsd.org>2007-11-04 22:09:02 +0000
commit9648e8e453ad6a74c46dd4158ecd849e21113d5a (patch)
tree6ffa00faf57f502487d056be306440cfe2260ee4
parentUpdate from master repo: (diff)
downloadwireguard-openbsd-9648e8e453ad6a74c46dd4158ecd849e21113d5a.tar.xz
wireguard-openbsd-9648e8e453ad6a74c46dd4158ecd849e21113d5a.zip
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().
-rw-r--r--usr.sbin/hoststated/hoststated.c6
-rw-r--r--usr.sbin/hoststated/log.c4
-rw-r--r--usr.sbin/relayd/log.c4
-rw-r--r--usr.sbin/relayd/relayd.c6
4 files changed, 10 insertions, 10 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);
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':