Remove log initialization form print_log_n_stderr

The log manager must not be initialized twice. If an error is to be logged
to a file, the log manager has already been initialized.
This commit is contained in:
Markus Mäkelä
2018-08-22 09:02:50 +03:00
parent 1692765503
commit ad36a50e97

View File

@ -728,14 +728,11 @@ static void print_log_n_stderr(
{ {
if (do_log) if (do_log)
{ {
if (mxs_log_init(NULL, get_logdir(), MXS_LOG_TARGET_FS)) MXS_ERROR("%s%s%s%s",
{ logstr,
MXS_ERROR("%s%s%s%s", eno == 0 ? "" : " (",
logstr, eno == 0 ? "" : mxs_strerror(eno),
eno == 0 ? "" : " (", eno == 0 ? "" : ")");
eno == 0 ? "" : mxs_strerror(eno),
eno == 0 ? "" : ")");
}
} }
if (do_stderr) if (do_stderr)
{ {