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:
@ -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,
|
||||||
|
Reference in New Issue
Block a user