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:
Markus Mäkelä
2018-11-18 22:02:48 +02:00
parent 9c19a481fc
commit ba8ec0a2a3

View File

@ -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;