docs/notes/log2src.md
The Extracting Data functionality in lnav parsed log message bodies based on various conventions, such as a key/value pair separated by an equal sign. That approach can work if the data is nicely structured, but is not totally reliable. As an alternative, if the logging source code is available, we can leverage log2src to find the corresponding log statement for a log message. We can then fairly accurately extract the values and pair them up with the appropriate variables. This functionality can be exposed to the user in two ways:
p).
In addition, we can now show the source code of the log
statement.The following sections will go into details on demos for these two approaches.
This demo covers modifying only lnav to show the results of log2src's magic. It's mostly retreading existing ground, so it should be more tractable than trying to get the debugger stuff working first.
Steps:
p to reveal the message details overlayImplementation tasks:
all_logs table to use log2src instead of the
current extraction code.This demo is probably the more useful one since it allows people to stay in their editor.
Steps:
Implementation tasks: