Skip to contentSkip to conversation

Replace M_DEBUG with D_LOW as the former is too verbose

PATCH In review [email protected]... 2 participants 4 messages Jun 5, 2018 – Jun 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Replace M_DEBUG with D_LOW as the former is too verbose

From: Selva Nair <[email protected]...>

M_DEBUG only indicates the type of the message and will print even at verb 0. Use D_LOW which is M_DEBUG combined with verb = 4 and a mute level.

---
Moving towards what the man page says:
verb 0 means "No output except fatal errors."

M_WARN also needs replacement but that one is more pervasive and needs more care.

 src/openvpn/ssl_openssl.c | 2 +-
 src/openvpn/tun.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/openvpn/ssl_openssl.c +1 -1
index 8ef68eb..527a600 100644
@@ -622,7 +622,7 @@ tls_ctx_load_ecdh_params(struct tls_root_ctx *ctx, const char *curve_name
 
     EC_KEY_free(ecdh);
 #else  /* ifndef OPENSSL_NO_EC */
-    msg(M_DEBUG, "Your OpenSSL library was built without elliptic curve support."
+    msg(D_LOW, "Your OpenSSL library was built without elliptic curve support."
         " Skipping ECDH parameter loading.");
 #endif /* OPENSSL_NO_EC */
 }
src/openvpn/tun.c +1 -1
index 2e33880..688a920 100644
@@ -1043,7 +1043,7 @@ do_ifconfig(struct tuntap *tt,
         const char *ifconfig_broadcast = NULL;
         struct argv argv = argv_new();
 
-        msg( M_DEBUG, "do_ifconfig, tt->did_ifconfig_ipv6_setup=%d",
+        msg( D_LOW, "do_ifconfig, tt->did_ifconfig_ipv6_setup=%d",
              tt->did_ifconfig_ipv6_setup );
 
         /*
Signature · 1 line
2.6.2
#1 lore raw

Hi,

Quoted 5 lines · On Tue, Jun 05, 2018 at 04:06:10PM -0400, [email protected]... wrote:

From: Selva Nair <[email protected]...>

M_DEBUG only indicates the type of the message and will print even at verb 0. Use D_LOW which is M_DEBUG combined with verb = 4 and a mute level.

This does not want to apply for me - the tun.c hunk says "apply at line 1043", but the line in question is in line 893, and the context is different.

I assume this was on top of Antonio's v6-only 1/5?

OTOH this is trivial enough... I think the patch makes sense, it will inevitably create a conflict with Antonio's v2 1/8, so I'll just mangle the patch by hand.

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
author
#2 lore raw

Hi,

Quoted 14 lines · Gert Doering

Hi,

Quoted 5 lines · On Tue, Jun 05, 2018 at 04:06:10PM -0400, [email protected]... wrote:

From: Selva Nair <[email protected]...>

M_DEBUG only indicates the type of the message and will print even at verb 0. Use D_LOW which is M_DEBUG combined with verb = 4 and a mute level.

This does not want to apply for me - the tun.c hunk says "apply at line 1043", but the line in question is in line 893, and the context is different.

Quoted 5 lines

I assume this was on top of Antonio's v6-only 1/5?

OTOH this is trivial enough... I think the patch makes sense, it will inevitably create a conflict with Antonio's v2 1/8, so I'll just mangle the patch by hand.

You are right, based on wrong branch. Sorry about that. And, thanks.

Selva

#3 lore raw
In reply to [email protected]...

Your patch has been applied to the master and release/2.4 branch (I consider this a bugfix, as "someone" just didn't understand that M_DEBUG is not for what it sounds it is - D_LOW makes sense)

commit 68441882e55b8e6c3c55a4078fbfdd76c7ada6bc (master) commit 935d17062f68868fe922bbc446476b4de6fa3d45 (release/2.4)

Author: Selva Nair
Date:   Tue Jun 5 16:06:10 2018 -0400
     Replace M_DEBUG with D_LOW as the former is too verbose

     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg16964.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering