Fix debug assertion in maxavrocheck
A debug assertion would be triggered when a message was logged without initializing the log subsystem.
This commit is contained in:
@ -24,6 +24,8 @@
|
||||
#include <limits.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include <maxscale/log.h>
|
||||
|
||||
static int verbose = 0;
|
||||
static uint64_t seekto = 0;
|
||||
static int64_t num_rows = -1;
|
||||
@ -136,6 +138,12 @@ int main(int argc, char** argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!mxs_log_init(NULL, NULL, MXS_LOG_TARGET_STDOUT))
|
||||
{
|
||||
fprintf(stderr, "Failed to initialize log.\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
char c;
|
||||
int option_index;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user