fluent-bit: make syslog output message format more acceptable

This commit is contained in:
Mohd Husaam Mehdi 2025-05-21 21:59:46 +05:30
parent 8e9492f7af
commit 79928e9fc3

View file

@ -0,0 +1,14 @@
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
index 4ecc7c4ac..03ed0d359 100644
--- a/plugins/out_syslog/syslog.c
+++ b/plugins/out_syslog/syslog.c
@@ -318,7 +318,8 @@ static flb_sds_t syslog_rfc3164 (flb_sds_t *s, struct flb_time *tms,
return NULL;
}
- tmp = flb_sds_printf(s, "<%i>%s %2d %02d:%02d:%02d ", prival,
+ // just add 99 to satisfy parsers that expect a number at the start
+ tmp = flb_sds_printf(s, "99 <%i>%s %2d %02d:%02d:%02d ", prival,
rfc3164_mon[tm.tm_mon], tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
if (!tmp) {