netdata/netdata

View on GitHub
src/logsmanagement/fluent_bit_build/flb-log-fmt.patch

Summary

Maintainability
Test Coverage
diff --git a/src/flb_log.c b/src/flb_log.c
index d004af8af..6ed27b8c6 100644
--- a/src/flb_log.c
+++ b/src/flb_log.c
@@ -509,31 +509,31 @@ int flb_log_construct(struct log_message *msg, int *ret_len,
 
     switch (type) {
     case FLB_LOG_HELP:
-        header_title = "help";
+        header_title = "HELP";
         header_color = ANSI_CYAN;
         break;
     case FLB_LOG_INFO:
-        header_title = "info";
+        header_title = "INFO";
         header_color = ANSI_GREEN;
         break;
     case FLB_LOG_WARN:
-        header_title = "warn";
+        header_title = "WARN";
         header_color = ANSI_YELLOW;
         break;
     case FLB_LOG_ERROR:
-        header_title = "error";
+        header_title = "ERROR";
         header_color = ANSI_RED;
         break;
     case FLB_LOG_DEBUG:
-        header_title = "debug";
+        header_title = "DEBUG";
         header_color = ANSI_YELLOW;
         break;
     case FLB_LOG_IDEBUG:
-        header_title = "debug";
+        header_title = "DEBUG";
         header_color = ANSI_CYAN;
         break;
     case FLB_LOG_TRACE:
-        header_title = "trace";
+        header_title = "TRACE";
         header_color = ANSI_BLUE;
         break;
     }
@@ -559,7 +559,7 @@ int flb_log_construct(struct log_message *msg, int *ret_len,
     }
 
     len = snprintf(msg->msg, sizeof(msg->msg) - 1,
-                   "%s[%s%i/%02i/%02i %02i:%02i:%02i%s]%s [%s%5s%s] ",
+                   "%s%s%i-%02i-%02i %02i:%02i:%02i%s:%s fluent-bit %s%s%s: ",
                    /*      time     */                    /* type */
 
                    /* time variables */