expand/collapse log messages

21 views
Skip to first unread message

Gergely K.

unread,
Jun 1, 2021, 7:37:25 AM6/1/21
to lnav
Hi!

I am very happy to find lnav, because it seems to suit my needs.

Maybe I search for the wrong terms, but I cannot find answers to the following:
* can I collapse all log messages? (say stack traces)
* can I navigate to the next log message (when the log messages are not collapsed), so the next logmessage (be it either info/warning/whatever message)?

thanks
Gergo

Nicolas Bock

unread,
Jun 1, 2021, 11:29:22 AM6/1/21
to Gergely K., ln...@googlegroups.com

On Tue, Jun 01 2021, Gergely K. wrote:

> Hi!
>
> I am very happy to find lnav, because it seems to suit my needs.
>
> Maybe I search for the wrong terms, but I cannot find answers to the
> following:
> * can I collapse all log messages? (say stack traces)

I am not aware of such a feature. Lnav parses logs on a per
line basis and does not support the concept of an extended
log entry consisting of multiple lines.

There are open issues to address this though [1, 2].

[1] https://github.com/tstack/lnav/issues/813
[2] https://github.com/tstack/lnav/issues/410

> * can I navigate to the next log message (when the log messages are not
> collapsed), so the next logmessage (be it either info/warning/whatever
> message)?

Have you tried e/E and w/W?

Hope this helps,

Nick

> thanks
> Gergo

Gergely K.

unread,
Jun 1, 2021, 12:31:33 PM6/1/21
to Nicolas Bock, ln...@googlegroups.com
On Tue, Jun 1, 2021 at 5:29 PM Nicolas Bock <nicol...@gmail.com> wrote:
> * can I collapse all log messages? (say stack traces)

I am not aware of such a feature. Lnav parses logs on a per
line basis and does not support the concept of an extended
log entry consisting of multiple lines.
So you are saying lnav does not "understand" multiline log formats? Like stack traces? It seems that it knows the trace is part of the message started on an earlier line based on the coloring of the message.
 
> * can I navigate to the next log message (when the log messages are not
> collapsed), so the next logmessage (be it either info/warning/whatever
> message)?

Have you tried e/E and w/W?

They are cool, when you are hunting for errors/warnings, but not good when you just want to skip the current (multiline) message.
thanks
Gergo


--
Mobile:(+36 20)356 9656
"Olyan lángész vagyok, hogy poroltóval kellene járnom!"

lnav support

unread,
Jun 1, 2021, 12:52:21 PM6/1/21
to Gergely K., Nicolas Bock, ln...@googlegroups.com
On Tuesday, June 1, 2021 9:30 AM, Gergely K. <pihe...@gmail.com> wrote:
On Tue, Jun 1, 2021 at 5:29 PM Nicolas Bock <nicol...@gmail.com> wrote:
> * can I collapse all log messages? (say stack traces)

I am not aware of such a feature. Lnav parses logs on a per
line basis and does not support the concept of an extended
log entry consisting of multiple lines.
So you are saying lnav does not "understand" multiline log formats? Like stack traces? It seems that it knows the trace is part of the message started on an earlier line based on the coloring of the message.

lnav understands multiline log messages, but it's internal structures make it
difficult to hide the extra lines in a message.  Some internal reorganization is
needed to make operations like this possible/efficient.

> * can I navigate to the next log message (when the log messages are not
> collapsed), so the next logmessage (be it either info/warning/whatever
> message)?

Have you tried e/E and w/W?

They are cool, when you are hunting for errors/warnings, but not good when you just want to skip the current (multiline) message.

In v0.9.0, you can customize the keymap to add bindings to do what you want.
I think the commands in this comment should work for you:


thanks
Gergo

tim

Reply all
Reply to author
Forward
0 new messages