lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Log file with microsecond precision but no date breaks in 0.11.1

Open dufferzafar opened this issue 2 years ago • 1 comments

❯ head 20221013.log
21:11:00.845278 NONE *********************************************************************** [serverD]
21:11:00.845279 NONE ../server/main.cpp: server[Unknown] version[Unknown] [serverD]
21:11:00.845279 NONE ../server/main.cpp: compiled on [Oct 13 2022 21:07:08] [serverD]
21:11:00.845279 NONE *********************************************************************** [serverD]

This was lnav 0.11.1 shows (converted to lo-fi):

2022-10-13 21:11:00.845000NONE *********************************************************************** [serverD]
2022-10-13 21:11:00.845000NONE ../server/main.cpp: server[Unknown] version[Unknown] [serverD]
2022-10-13 21:11:00.845000NONE ../server/main.cpp: compiled on [Oct 13 2022 21:07:08] [serverD]
2022-10-13 21:11:00.845000NONE *********************************************************************** [serverD]

Screenshot:

image

Notice that microseconds are now gone, and more importantly, they've taken a space with them!

Is there a way to disable this behaviour?

Originally posted by @dufferzafar in https://github.com/tstack/lnav/issues/967#issuecomment-1277840515

dufferzafar avatar Apr 12 '23 20:04 dufferzafar

I saw that in the code the test was done with a test file that didn't have microsecond precision as well:

https://github.com/tstack/lnav/commit/d82140de52a11378af352900aca30e5b46a71975

dufferzafar avatar Apr 12 '23 20:04 dufferzafar

The most recent release v0.12.2 fixes the microseconds issue. However, it would consume the NONE as part of the timestamp. I've pushed a change to fix that.

tstack avatar May 24 '24 13:05 tstack