From 37c804e0d3e225bce629f8c1752868c4a5b67c0a Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 19 Oct 2017 12:56:12 +0300 Subject: [PATCH] MXS-1327 Warn if debug priority enabled in release mode Turning debug on has no effect if MaxScale has been built in release mode. A warning will now be displayed to the user if that is attempted. --- server/modules/routing/debugcli/debugcmd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/modules/routing/debugcli/debugcmd.c b/server/modules/routing/debugcli/debugcmd.c index 737425267..2bd89b563 100644 --- a/server/modules/routing/debugcli/debugcmd.c +++ b/server/modules/routing/debugcli/debugcmd.c @@ -2509,6 +2509,14 @@ static void enable_log_priority(DCB *dcb, char *arg1) if (priority != -1) { mxs_log_set_priority_enabled(priority, true); + +#if !defined(SS_DEBUG) + if (priority == LOG_DEBUG) + { + dcb_printf(dcb, + "Enabling '%s' has no effect, as MaxScale has been built in release mode.\n", arg1); + } +#endif } else {