tstack / lnav

Log file navigator
http://lnav.org
BSD 2-Clause "Simplified" License
7.83k stars 312 forks source link

Pretty-printer adds extra new-lines if line contains "(' ',' ')" #1297

Open lheinold opened 1 month ago

lheinold commented 1 month ago

lnav version v0.12.2 (same behavior in 0.10.1)

Describe the bug When pretty printing a log (Shift + P), it will split the log into new lines if it contains the string (' ',' '). I have no idea why this is.

Example log:

[2024-08-28 13:39:23] test 1
[2024-08-28 13:39:23] test 2
[2024-08-28 13:39:23] the quick brown fox
[2024-08-28 13:39:23] this is a test (' ',' ') and another test
[2024-08-28 13:39:23] testing some more

Log after Shift+P:

[2024-08-28 13:39:23] test 1
[2024-08-28 13:39:23] test 2
[2024-08-28 13:39:23] the quick brown fox
[2024-08-28 13:39:23] this is a test (' ',
    ' '
) and another test
[2024-08-28 13:39:23] testing some more

I have no idea why lnav is adding newlines here, but it's really annoying because the actual log I am working on has a lot of lines with (' ',' '). If this is a feature, is there any way to to turn it off?

To Reproduce

  1. Create a file called test.log and paste the lines of the 'example log' above
  2. Run lnav test.log
  3. Press Shift + P
  4. See weird newlines added