MXS-828: Log warning if both syslog and maxlog disabled
A warning is logged to stderr if both syslog and maxlog are disabled. Earlier a note was unconditionally written to stdout for each.
This commit is contained in:
@ -1750,16 +1750,6 @@ int main(int argc, char **argv)
|
|||||||
goto return_main;
|
goto return_main;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*syslog_enabled))
|
|
||||||
{
|
|
||||||
printf("Syslog logging is disabled.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(*maxlog_enabled))
|
|
||||||
{
|
|
||||||
printf("MaxScale logging is disabled.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
mxs_log_set_syslog_enabled(*syslog_enabled);
|
mxs_log_set_syslog_enabled(*syslog_enabled);
|
||||||
mxs_log_set_maxlog_enabled(*maxlog_enabled);
|
mxs_log_set_maxlog_enabled(*maxlog_enabled);
|
||||||
|
|
||||||
@ -1826,6 +1816,11 @@ int main(int argc, char **argv)
|
|||||||
get_cachedir());
|
get_cachedir());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(*syslog_enabled) && !(*maxlog_enabled))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "warning: Both MaxScale and Syslog logging disabled.\n");
|
||||||
|
}
|
||||||
|
|
||||||
MXS_NOTICE("Configuration file: %s", cnf_file_path);
|
MXS_NOTICE("Configuration file: %s", cnf_file_path);
|
||||||
MXS_NOTICE("Log directory: %s", get_logdir());
|
MXS_NOTICE("Log directory: %s", get_logdir());
|
||||||
MXS_NOTICE("Data directory: %s", get_datadir());
|
MXS_NOTICE("Data directory: %s", get_datadir());
|
||||||
|
Reference in New Issue
Block a user