X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Flog_logstash.c;h=6ebab3bea68236d00492fd2af9bf225d8b2fba5f;hp=8df43136164d1b2d79a7d511b03b3e918e75d3b4;hb=4c02602344017800b5864d833d0cbdf8f52874cd;hpb=4c0848b1fb7cd097eeec947892d7bad5fd178ad7 diff --git a/src/log_logstash.c b/src/log_logstash.c index 8df43136..6ebab3be 100644 --- a/src/log_logstash.c +++ b/src/log_logstash.c @@ -183,22 +183,14 @@ err: static void log_logstash_log(int severity, const char *msg, user_data_t __attribute__((unused)) * user_data) { - yajl_gen g; -#if !defined(HAVE_YAJL_V2) - yajl_gen_config conf = {}; - - conf.beautify = 0; -#endif - if (severity > log_level) return; #if HAVE_YAJL_V2 - g = yajl_gen_alloc(NULL); + yajl_gen g = yajl_gen_alloc(NULL); #else - g = yajl_gen_alloc(&conf, NULL); + yajl_gen g = yajl_gen_alloc(&(yajl_gen_config){0}, NULL); #endif - if (g == NULL) { fprintf(stderr, "Could not allocate JSON generator.\n"); return;