MXS-2005: Use log manager only after initialization

The log manager functions must not be used before it is initialized.
This commit is contained in:
Markus Mäkelä
2018-08-12 11:01:53 +03:00
parent 39ce6c624f
commit 5a306aa20a
13 changed files with 22 additions and 6 deletions

View File

@ -1014,6 +1014,8 @@ int main(int argc, char* argv[])
{
cerr << "error: Could not setup query classifier." << endl;
}
mxs_log_finish();
}
}
else

View File

@ -305,6 +305,7 @@ int main()
{
rc = (MaskingRulesTester::test_account_handling() == EXIT_FAILURE) ? EXIT_FAILURE : EXIT_SUCCESS;
}
mxs_log_finish();
}
return rc;

View File

@ -169,6 +169,7 @@ int main(int argc, char **argv)
// We ignore potential errors.
mxs_log_init(NULL, NULL, MXS_LOG_TARGET_DEFAULT);
atexit(mxs_log_finish);
mxs_log_set_augmentation(0);
mxs_log_set_priority_enabled(LOG_DEBUG, debug_out);

View File

@ -96,6 +96,7 @@ int main(int argc, char **argv)
mxs_log_init(NULL, NULL, MXS_LOG_TARGET_DEFAULT);
atexit(mxs_log_finish);
mxs_log_set_priority_enabled(LOG_NOTICE, false);
mxs_log_set_priority_enabled(LOG_ERR, true);