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.
This commit is contained in:
Johan Wikman 2017-10-19 12:56:12 +03:00
parent 501c35d7b2
commit 37c804e0d3

View File

@ -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
{