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:
@ -2509,6 +2509,14 @@ static void enable_log_priority(DCB *dcb, char *arg1)
|
|||||||
if (priority != -1)
|
if (priority != -1)
|
||||||
{
|
{
|
||||||
mxs_log_set_priority_enabled(priority, true);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user