New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant filter on rotated logs (filter-in filter-out), searching works fine. #654
Comments
Not sure if related, but rather than add a new issue report...
The log with QQ in is not rotated, others are. The loss of filter-out is not at times that any of my log files are being rotated, there is at least one gz log history file open (but not, of course, getting updates). |
@tstack the format is Apache log. But the utility used for log rotation is newsyslog (its a freeBSD system), so logs starts with a newsyslog timestamp and reason of the log rotation (in this case is only by a cron job, not log size or other reason).
Similar on the freeBSD newsyslog man (https://www.freebsd.org/cgi/man.cgi?query=newsyslog.conf&sektion=5&manpath=freebsd-release-ports), under the flags section; the flag 'B' states if the file is a binary and not inserting the "turn over" message. I dont know if this qualifies as a 'wrapped in syslog'... But that's de reason why those lines are in the log file. |
Just reset my "QQ" filter, had to ^F all off and ^F all on as TAB>off>TAB then TAB>on>TAB still left the same batches of QQ lines in display. |
@jmj-uy lnav can only support one file format per file. So, if the first line is a syslog message, the rest of the file will be parsed as if it were syslog. In this case, the rollover message is confusing lnav and resulting in the apache log messages not being recognized. Are you able to use the 'B' option to disable the rollover message for these files? |
Just downloaded latest zip for macOS, lnav-0.9.0-os-x.zip But run crashes, however this is the same as I have had for a long time and I can still only run a rather old version of lnav 0.8.4 built here with brew over 18 months ago (I am running El Cap 10.11.6)... Dyld Error Message: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread $ls -al /usr/lib/libsqlite3.dylib Note this is as per my report above June 5, 2019 |
further detail on that library |
@cw1nte It looks like I didn't do the OS X build right, I'll redo it to make sure things are statically linked this morning. |
@cw1nte Can you try the following build, it should have more of the libraries statically linked: https://github.com/tstack/lnav/releases/download/v0.9.0/lnav-0.9.0a-os-x.zip |
Hi! (Version: lnav 0.8.5)
Im using lnav to parse Apache logs, and it usually works without issues. But recently looking through some rotated Apache logs, i found that although I can search withing lnav, all filtering stoped working for some reason.
After looking into the log files, I found that if the log file starts with a "log rotation stamp", the filter-in and filter-out functions wont work.
To reproduce, add as the first line in an Apache log the following line:
May 31 00:00:00 hostname newsyslog[11111]: logfile turned over
Also, this only happens if that is the First line only, if you insert it in the middle of the log file, lnav works as usual.
If you remove the last digit in the time stamp, filtering will work as usual:
May 31 00:00:0 hostname newsyslog[11111]: logfile turned over
A similar issue is reproduced, but not in the whole log file, but only on that line if you add a ":" before the URI:
192.168.1.2 - - [31/May/2019:17:48:39 -0300] :"GET /path/resource.php HTTP/1.1" 200 254
As a side note, in version 0.8.2; the a similar issue happened, and started working again if i remove the last digit in the timestamp or if the last ":" is removed:
May 31 00:00:00 hostname newsyslog[11111] logfile turned over
May 31 00:00:0 hostname newsyslog[11111]: logfile turned over
Maybe the 2 versions behavior helps you find the issue.
The text was updated successfully, but these errors were encountered: