simagix / hatchet

MongoDB JSON Log Analyzer
Apache License 2.0
165 stars 22 forks source link

fix: accommodate long log lines by using a scanner instead of readline to loop file #20

Closed TheQueenIsDead closed 1 year ago

TheQueenIsDead commented 1 year ago

This fixes #19

There is no issue with the log analyses because the isPrefix flag is taken into account and looped to build up a new buffer. The bug only existed with the validation which did not do the above.

This fix proposes to use a scanner to simplify file parsing, and resolve issues where the length of a log line would cause the file to fail validation incorrectly.

TheQueenIsDead commented 1 year ago

Those are great things to consider with regards to the parsing here, thank you for explaining them to me. I'm happy to close this PR and leave the matter of resolving the issue to you :+1: