Make it possible to also show lines before and after each matching line
At times when consulting logs, you search for a certain pattern, but you also want to see one or more lines that come just before or after each matching line in the search results, because those lines contain interesting information that may be difficult to match.
For example you may search for lines that contain "ERROR" but also want to see the 2 following lines that may contain the beginning of a stack trace, without seeing the complete stack trace in the search results. Or you may search for lines that contain "ERROR" and be interested in the info line that comes just before the matching lines. Or a combination of those, i.e. you'd like to see a given number of lines before and a given number of lines after the matching lines.
grep allows to do this with the -B and -A options (and the -C option but that's just a combination of the other 2 options for convenience): GNU Grep · Invoking grep · Command-line Options · Context Line Control
Being able to do something similar in klogg would be handy, I think.
Thanks for idea. This has been mentioned several times already. Should be possible to implement together with negative filters