Reinstate implicit log initialization

As some of the functionality depends on the log being default initialized
in the case an error occurs, the code needed to be reinstated.
This commit is contained in:
Markus Mäkelä
2018-08-28 16:15:42 +03:00
parent 9adc08a686
commit d9ddf0f720

View File

@ -753,12 +753,17 @@ static void print_log_n_stderr(
{ {
if (do_log) if (do_log)
{ {
static bool log_is_inited = false;
if (log_is_inited || init_log())
{
log_is_inited = true;
MXS_ERROR("%s%s%s%s", MXS_ERROR("%s%s%s%s",
logstr, logstr,
eno == 0 ? "" : " (", eno == 0 ? "" : " (",
eno == 0 ? "" : mxs_strerror(eno), eno == 0 ? "" : mxs_strerror(eno),
eno == 0 ? "" : ")"); eno == 0 ? "" : ")");
} }
}
if (do_stderr) if (do_stderr)
{ {
fprintf(stderr, fprintf(stderr,