rtail
rtail copied to clipboard
Dates are not fully removed from the line after being parsed
Hi,
Great job on the new release!
The date parsing feature is really cool but in some cases parts of the date remains in the line.
For example with nginx logs:
The date is parsed correctly but '2015' is not removed from the line.

Another example:
Source file:

On rtail the day and the year remain on the line:

Thanks!
This looks like a bug in the chrono-node library that I am using. For the time being I would suggest you turn it off with --no-parse-date on the rtail cli command and collapse timestamp column.
I will start to add test suite for those examples you provided, but it's kinda hard to have it always work with no predefined format. I agree Nginx is one of those that must work. Are you using a custom log format?
Thanks for contributing @baptistemarchand !
Not sure if I should write it down here or another bug but the date parsing gets some lines swapped when the output is a multiline JSON object though it's good when I disable it.
@assertnotnull if you are tailing a multiline JSON structure you need to absolutely turn parsing off otherwise it will replace everything that looks like a date! I am even thinking about turning date parsing off by default. This is one of those instances where I need to wait for some feedback and act accordingly.
@kilianc the second format is the output of the command 'date'.
cc/ @wanasit