Open jefft opened 6 years ago
I've just run into this as well, doing pretty much the same thing. The only slight variation is that I've split the stacktrace into it's own field in the pattern match so I could hide the stack trace while leaving the body displaying. See this gist for the format I'm using.
The pattern matching works well, but issuing :hide-fields stacktrace
does nothing. I long for the day I can hit x
to toggle stack traces on and off!
I have the same problem, we use glog but there are quite a few multi-line logs which prints dumped requests and responses. Alternatively, can we join the multi-line logs or fold them?
Any ideas/updates on this? Even a grep -v 'at '
would help taming these Java traces.
Hi,
Java apps love their stacktraces, and it would be glorious if lnav could collapse them.
I was hoping to achieve this with
hide-fields body
to hide the body field. Unfortunately this only hides the first line ofbody
.Take the example log file:
I have extended the 'java_log' format to accept this multi-line format, by placing the following in
~/.lnav/formats/installed/multiline_java.json
:My sample file is now recognised as type
java_log
: If I hitp
I can see thatbody
is correctly matching the multi-line string: I then runhide-fields body
and hitx
, which gives me: I would expect the whole stacktrace to be hidden.