-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add debug output pane to cu-consolemon #219
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a good start.
217ec7f
to
7ded214
Compare
@makeecat Thanks for the review, I have now used Also, I think we should make this Debug pane behind feature gate as this library is using tracing I thinking adding a default feature like |
I agree with adding a debug-panel faeture gate. In the future we may want to use tokio async to handle all IO-related operations to avoid overhead, but we can start with this implementation at the current stage. |
ed376a4
to
a30678c
Compare
Thanks @AS1100K! My biggest question here is why do we want to introduce tracing in the middle of it. Also, I don't see where we keep the buffer from not growing indefinitely, we should have somewhere a constant or parameter saying: we keep the last 1000 lines of back buffer. Otherwise your robot will run out of memory at some point :) |
I also kept that in mind, and only keep the number of logs according to terminal height. here https://github.com/copper-project/copper-rs/pull/219/files#diff-77cbd66ea06743fe2a1e13a87d5525ab87330d6cc6d548f35068b256168b611cR352-R356 |
aaaah... ok ... we need a back buffer :) people will need to scroll back up a little bit |
bc3a73f
to
4dbf360
Compare
@gbin Thanks for you review, I have now removed the support for
Also, I would also implement it soon |
4dbf360
to
a83bf44
Compare
Cool! Thank you for your patience! cu-consolemon is not part of core, I don't think it should: for example in production robots should not have it and might use a different implementation behind the Monitoring API. what about hooking that up either as a Log destination (that will be picked up when consolemon is in) or, another possible way is to add a logging API to the monitoring API (that consolemon relies on and decouples it from core)? |
4493274
to
0384951
Compare
0384951
to
9b00e92
Compare
9b00e92
to
a1379af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, 2 comments left and we merge this.
This makes the channel doesn't fill up if the current screen isn't on debug pane
76ef43a
to
57f9b7a
Compare
Thanks @AS1100K good work! |
Fixes #153
Demo
Screen.Recording.2025-01-17.224847.mp4