Add debug output pane to cu-consolemon#219
Add debug output pane to cu-consolemon#219gbin merged 6 commits intocopper-project:masterfrom AS1100K:add-debug-output
Conversation
gbin
left a comment
There was a problem hiding this comment.
Thanks, this is a good start.
|
@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. |
|
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 |
|
@gbin Thanks for you review, I have now removed the support for
Also, I would also implement it soon |
|
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)? |
gbin
left a comment
There was a problem hiding this comment.
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
|
Thanks @AS1100K good work! |
Fixes #153
Demo
Screen.Recording.2025-01-17.224847.mp4