From ba8ec0a2a3a700c8dff28b98c455484cf315d6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sun, 18 Nov 2018 22:02:48 +0200 Subject: [PATCH] Fix debug assertion in maxavrocheck A debug assertion would be triggered when a message was logged without initializing the log subsystem. --- avro/maxavrocheck.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/avro/maxavrocheck.c b/avro/maxavrocheck.c index 3d65f9776..e5951f3d2 100644 --- a/avro/maxavrocheck.c +++ b/avro/maxavrocheck.c @@ -24,6 +24,8 @@ #include #include +#include + 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;