summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.c
diff options
context:
space:
mode:
authorJosh Cepek <josh.cepek@usa.net>2013-03-20 13:22:25 -0500
committerGert Doering <gert@greenie.muc.de>2013-03-20 21:56:59 +0100
commit152ca3e49f14b8fe8e7e52daf3cf11851fb98acd (patch)
tree16c4705e6a19bc4e14bd2c234309b347671ae59f /src/openvpn/options.c
parentc4358645fb37b7c4d9c82c0b7b8b4f17ec4cf326 (diff)
downloadopenvpn-152ca3e49f14b8fe8e7e52daf3cf11851fb98acd.tar.gz
openvpn-152ca3e49f14b8fe8e7e52daf3cf11851fb98acd.tar.xz
openvpn-152ca3e49f14b8fe8e7e52daf3cf11851fb98acd.zip
(updated) [PATCH] Warn when using verb levels >=7 without debug
On 3/20/2013 11:42, Arne Schwabe wrote: > ACK. But I would change "debug verb" to "debug verbosity" and I think > there should be no comma before "but" This text change makes sense: I've adjusted it to read "NOTE: debug verbosity..." and saved another byte removing the comma. Updated patch attached. -- Josh >From d41a0237220f2fea6647a508a2ab07263e0f160b Mon Sep 17 00:00:00 2001 From: Josh Cepek <josh.cepek@usa.net> Date: Tue, 19 Mar 2013 22:52:12 -0500 Subject: [PATCH] Warn when using verb levels >=7 without debug This patch adds a log warning when using --verb levels at 7 or higher when running on builds lacking debug support. Since official builds are now built with enable_debug=no, this warning will help developers identify why expected debug messages may not be present in log output. The test and message output code is omitted when built with enable_debug=yes or enable_small=yes. Signed-off-by: Josh Cepek <josh.cepek@usa.net> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <kicup2$gfv$1@ger.gmane.org> URL: http://article.gmane.org/gmane.network.openvpn.devel/7425 Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 58fbb8046b203ca23708c1765ee84330d8809266)
Diffstat (limited to 'src/openvpn/options.c')
-rw-r--r--src/openvpn/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 2eb4f91..ec39212 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -4672,6 +4672,12 @@ add_option (struct options *options,
{
VERIFY_PERMISSION (OPT_P_MESSAGES);
options->verbosity = positive_atoi (p[1]);
+#if !defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL)
+ /* Warn when a debug verbosity is supplied when built without debug support */
+ if (options->verbosity >= 7)
+ msg (M_WARN, "NOTE: debug verbosity (--verb %d) is enabled but this build lacks debug support.",
+ options->verbosity);
+#endif
}
else if (streq (p[0], "mute") && p[1])
{