rtail icon indicating copy to clipboard operation
rtail copied to clipboard

Dates are not fully removed from the line after being parsed

Open baptistemarchand opened this issue 10 years ago • 5 comments
trafficstars

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: image The date is parsed correctly but '2015' is not removed from the line. image

Another example: Source file: image

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

Thanks!

baptistemarchand avatar Jul 13 '15 12:07 baptistemarchand

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 !

kilianc avatar Jul 13 '15 15:07 kilianc

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 avatar Jul 13 '15 16:07 assertnotnull

@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 avatar Jul 13 '15 16:07 kilianc

@kilianc the second format is the output of the command 'date'.

baptistemarchand avatar Jul 13 '15 16:07 baptistemarchand

cc/ @wanasit

kilianc avatar Jul 16 '15 17:07 kilianc