Skip to content

First zellij log file format parser #1475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zykino
Copy link

@Zykino Zykino commented May 18, 2025

Hello,

I’m new to lnav and it looks like a very good project that I would have a hard time to learn since it does not understand the log format of tools I’m developing against regularly. So I went ahead and created a "parser" (not sure how you call them) for zellij which is a terminal multiplexer (a bit like tmux or screen but different).

I’m seeing 2 log variant and asked if there are others. I also asked if a "producer id" (lnav's opid-field) could be added to quickly filter the server, each clients and each plugin’s instances. I also asked if they have better name for some capture groups (module and module2 don’t feels good 😅)

Anyway I have this 1st implementation where I have some questions/issues:

  1. I filled the "file-pattern" field with the most common log file path. I’m not sure it is necessary (or even a good idea), since almost no other formats appear to have it.
  2. The cause_body field is always null, I’m not sure why since multiline default to true. This is an optional field of multi-line log that regex101.com correctly detected.
    1. This field contains a backtrace (or close enough). At first I wanted to cut it in lines or event components <cause_id>: <cause_log>. Is this useful in your experience or too much? I did not achieved it on regex101.com, since I’m not sure how dynamically increment capture group’s names.

Note: I did not compile this branch, I’m hoping that test done using the file installed in ~/.config/lnav/formats/installed give the same results as compiled in.

@Zykino
Copy link
Author

Zykino commented May 20, 2025

I also read that lnav can "go to next/previous" linux’s boot, it can be interesting to go to next/previous zellij’s startup. I’m not sure how it is done. Can you point me in the right direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant