fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.79k stars 1.57k forks source link

Parser: invalid time format error when comma appears in format string #524

Open Markbnj opened 6 years ago

Markbnj commented 6 years ago

fluent-bit version: 0.12.14

We are trying to parse timestamps with the following format in a tail input:

2018-03-01 17:46:03,781

We are using a parser time format defined as follows:

Time_Format %Y-%m-%d %H:%M:%S,%L

This results in the following error on startup:

[error] [parser:foo] Invalid time format %Y-%m-%d %H:%M:%S,%L.

And of course we do not get the timestamp in the output record. If I remove the ",%L" from the format string the error disappears, but obviously the format no longer matches.

I have tried quoting the format string, but that did not resolve the issue. Also note that we successfully used this same format string in custom confs for google-fluentd to log to stackdriver.

Markbnj commented 6 years ago

Also note that I tried this on 0.13-dev-0.8 with the same result.

gabe-sorensen commented 6 years ago

Tried on 0.13.0 with the same result

edsiper commented 6 years ago

"comma" for now is not supported, only a dot. I will make sure to fix it.

RaySmith1 commented 4 years ago

I ran into the same issue with ":" Should support comma, space, dash, colon and dot at a minimum, yes?