-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Request: documentation on zellij logging system #1620
Comments
Hey @AutumnMeowMeow - I hope you don't mind that I edited the issue to add checkboxes so we can track this. First, thanks for bringing this up. This is one of those "lore" parts that have been passed by way of our chat servers and one-on-ones. So I'm happy to have it documented. To start with, I just merged #1627 to kick this off. I'm added them in Otherwise, about some of the other points I'd like to consult you:
To the best of my knowledge, this is a problem we don't have. I did some rudimentary testing and there is no issue with this. Am I missing something?
This sounds like a very useful feature, but one that we currently don't have. Most of the work on our VT parsing has up until now been done by yours truly, and like any lone developer I have my ways in this regard. Mostly, I go to the various callbacks (eg. here: https://github.com/zellij-org/zellij/blob/main/zellij-server/src/panes/grid.rs#L1947) and stick a I don't think this is a good way to go about it though, and would be happy to add some convenience methods here. Do you have any specific suggestions? What would be the most comfortable for you?
We usually mostly do these by running a Zellij instance and performing the desired action. This might be a blind-spot for me though - so could you describe what you'd like to see here?
Hum - sad to hear about the more recent vttests! Would be happy to get to the bottom of this ASAP. Your help, if you'd like to work on this, would be greatly appreciated! What sort of debugging experience would you like here? Right now we can debug-print the
Thanks! |
👍
Thank you!
I have not run across an issue, it is just nice to know. I've seen other issues here where people are complaining of very large logs when they have a long-running zellij process, they might be happy to hear that they can cull those anytime they want without risking their sessions.
Thank you, this is a very handy pointer! So having looked at it, I've got some bugs in mouse handling to reported. (That explains why jexer was unhappy with it, I figured it would be a small thing.)
It looks like this is partially implemented already with zellij here:
Being able to see what falls through the unhandled cases for esc_dispatch(), csi_dispatch(), and osc_dispatch() would go a long way. As an example for wezterm, going through the vttests it doesn't recognize it logs this:
...which makes it pretty easy to see what's going on.
I'm thinking of pointers for using log4rs to turn on debugging of just some bits. Are there names for subsystems, or different loggers that do particular things? If there's only one logger, and it's enabled by --debug, then don't bother making any further work here. (For Jexer, I had a specific requirement to never write to disk, so I didn't put in a real logging infrastructure, I just had a popup window to show exception stacktraces. But inside the code at a couple major spots one could flip a DEBUG flag, recompile, and then get stuff emitted to stderr. The major spots for me were the event routing (keyboard/mouse bytes --> event --> widget it goes to), encoding to the terminal on the outside, and parsing the VT sequences for the terminal windows on the inside.)
I could! The vttests themselves are mostly OK, it just hangs immediately on running vttest until you press enter. I suspect there is a terminal report vttest is looking for that zellij isn't responding to. (vttest is always a moving target. Every couple years I have to go back and see what else I need to update... :) )
I think the major state changes logged to debug would be great, eventually. For now, just adding the unhandled ESC and OSC sequences to debug would go a long way. The absolute extreme end would be noting all of the state changes while processing. I did that here in qodem -- search for all the DLOG's, it's slightly insane. :) I don't think anyone will need that. |
That's a good point - but we recently introduced log rotation and a truncating strategy so I think these sorts of issues are already behind us.
Implemented and merged in #1636 - thanks!
The
Hum, I seem to remember seeing that and taking care of it. Maybe some sort of regression or some new test? If you'd like to take a look at it, that would be grand!
Oh dear! My browser search counts 240 of them :) |
So @AutumnMeowMeow - looking back through the issue I think we're not left with much, right? After the discussion, is there anything else you're missing and would like added to improve the dev experience here? |
I think we're good. :) Thank you! |
https://zellij.dev/documentation/ , README.md, and docs/ provide no information on the zellij logger. I had to dig through open issues and the discussions on #592 and #1410 to even know to look inside /tmp for the log files.
It would be really nice to know:
How to debug specific parts of zellij:
Opening/closing/resizing windows/panes/shells (size and placement).Launching/closing programs/shells (the actual spawned command line).Attach/detach sessions, and whether a server is still running and on what PID.Change in window size (e.g. SIGWINCH received), commands to resize terminal/shell windows (e.g. ioctl(TIOCSWINSZ))(Plus congrats on the latest release! 💗)
The text was updated successfully, but these errors were encountered: