I was careless with the initial json log impl since it did not deal
with incomplete log lines very well. This seems to fix some cases.
But, I was still able to replicate a lockup at one point, so it
might not be complete.
Using a map/multimap is too expensive/complex for how many
attributes we have on a line due to how many tree nodes
need to be malloced/freed. Just using a vector should be
good enough and a lot faster.
This is a checkpoint of the improvements to the sqlite integration. The
data_parser stuff should be much better now and I've tried to improve
other parts of the user experience as well.
Some changes to the glog_log sql table:
* Removed the 'glog_level' field since the standard one should be able to
handle everything now.
* Changed the 'file' column to 'src_file' and added a 'src_line' column.
* Added the sample glog log content to the test directory.
This change adds back support for line scrubbing and
adds a column that displays the time offset from
different points in the file. Also, try to handle
deleted files by dropping their lines from the display
view.
* help.txt: Update the help text for the new features.
* lnav.cc: Add scrub/time-offset key bindings. Also
added some more comments and added some handling for
deleted files.
* log_format_impls.cc: Add scrubbing for the generic
log format that shortens timestamps and RDNS strings.
* logfile_sub_source.cc: Add a time-offset column to
the display.
* textview_curses.cc: Some cleanup.
* grep_proc.cc: When a request is queued with the start line
== -1, we need to start searching from the highest line
ever seen and not the last line processed.
* line_buffer.cc: If a partial line was read, we need to
avoid returning another line if more data is appended
to the file.
* lnav.cc: Accept file name patterns on the command-line that
don't match any files yet. Initialize the screen before
redirecting stderr to the log file or /dev/null.
* log_format.hh: Add some comments. Start to add back support
for scrubbing.
* logfile_sub_source.cc: Move scrubbing to the format impl.
* textview_curses.hh: Add comments.