X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flog_logstash.c;h=3cf636e501b1891adc4584befa99fd995d10a613;hb=5afde1077e3c8fc119b79caa2572cbf84dbfe5ca;hp=2883e6c97d2872ac8e4e396cdedbe849e4effce5;hpb=a09f2fdf0450eb76317e1b7575a12ffb926068f4;p=collectd.git diff --git a/src/log_logstash.c b/src/log_logstash.c index 2883e6c9..3cf636e5 100644 --- a/src/log_logstash.c +++ b/src/log_logstash.c @@ -31,7 +31,6 @@ #include "plugin.h" #include -#include #include #include #if HAVE_YAJL_YAJL_VERSION_H @@ -65,12 +64,12 @@ static int log_logstash_config (const char *key, const char *value) if (0 == strcasecmp (key, "LogLevel")) { log_level = parse_log_severity(value); - if (log_level < 0) { - log_level = LOG_INFO; - ERROR("log_logstash: invalid loglevel [%s] defaulting to 'info'", - value); - return 1; - } + if (log_level < 0) { + log_level = LOG_INFO; + ERROR("log_logstash: invalid loglevel [%s] defaulting to 'info'", + value); + return 1; + } } else if (0 == strcasecmp (key, "File")) { sfree (log_file); @@ -147,7 +146,7 @@ static void log_logstash_print (yajl_gen g, int severity, * format time as a UTC ISO 8601 compliant string */ strftime (timestamp_str, sizeof (timestamp_str), - "%Y-%m-%d %H:%M:%SZ", ×tamp_tm); + "%Y-%m-%dT%H:%M:%SZ", ×tamp_tm); timestamp_str[sizeof (timestamp_str) - 1] = '\0'; if (yajl_gen_string(g, (u_char *)timestamp_str,