4 ms·
If the log-file viewing capabilities look interesting to you, check out lnav, which is built for that and excels at it: https://lnav.org/ https://lnav.org/
by href 4y ago
If the log-file viewing capabilities look interesting to you, check out lnav, which is built for that and excels at it:
https://lnav.org/ https://lnav.org/
- neilv 4y agoNice! I've been in rapid-response situations where I had to pull logs from various sources (including embedded devices) that weren't unified in a central logging service. I could get the logs onto my workstation, but then manually lining up who-saw-what-when involved a headache, even with Emacs. lnav seems to have a few features to support this. One very useful feature for this I didn't see listed for lnav was to support adjusting for timestamps in different timezones, like maybe you have a desktop's log in local time that you're trying to reconcile with servers. (A related but less-important bonus would be to be able to specify smaller arbitrary clock drift/offsets for each log.)
- tstack 4y ago> One very useful feature for this I didn't see listed for lnav was to support adjusting for timestamps in different timezones, like maybe you have a desktop's log in local time that you're trying to reconcile with servers. (A related but less-important bonus would be to be able to specify smaller arbitrary clock drift/offsets for each log.) You can adjust the timestamps for a file using the ":adjust-log-time" command (https://docs.lnav.org/en/latest/commands.html#adjust-log-time-timestamp https://docs.lnav.org/en/latest/commands.html#adjust-log-tim...). For example, if you wanted to shift the timestamps back an hour, you can do: :adjust-log-time -1h The shift is applied to the messages in the file that the top line in the view belongs to. If you want to do the shift programmatically, you can UPDATE the "time_offset" column of the "lnav_file" table directly (see https://docs.lnav.org/en/latest/sqltab.html#lnav-file https://docs.lnav.org/en/latest/sqltab.html#lnav-file)
- neilv 4y agoThanks!
- deleted 4y ago[deleted]