Uh oh!
There was an error while loading. Please reload this page.
Add debug log level and instrument important internal events - #469
Conversation
Uh oh!
There was an error while loading. Please reload this page.
ko1
commented
Jan 4, 2022
|
st0012
commented
Jan 4, 2022
@ko1 I've improved the log messages and it should be clearer now. I also adopted the "block" pattern for debug level helper. But I'm not sure if you'd like this pattern applied to other level's log helpers too? |
23724b7 to
e1118c8Compareko1
commented
Feb 5, 2022
I meant: and I don't think other log messages do not need to use this technique. |
st0012
commented
Feb 5, 2022
If you mean this should also be applied to other log-levels, it's essentially optimizing the logging mechanism's memory footprint. Perhaps that deserves separate PR? Also, what do you think about the current format? |
ko1
commented
Mar 20, 2022
If the "current format" is fowling which on the PR description, I'm ok (and it can be modified easily). This patch doesn't introduce block notation, so I work on it after merging it. |
st0012
commented
Mar 20, 2022
Yes the description contains the updated format. |
st0012
commented
Mar 28, 2022
@ko1 If you think the format is ok, I think it's ready for merge. |
ko1
commented
Mar 29, 2022
I'll merge it after v1.5.0. |
When working on features that involves Session <-> ThreadClient interaction, like #422, I often put multiple puts/pp in different places to see what's happening in the debugger. And then I feel that they're mostly about:
So I figure maybe we can add the
debuglog level and instrument them in a more uniformed format. I think it'll help ourselves debug issues and also help anyone who's interested in learning the debugger internal. And in some cases, having this information can help us debugging user issues as well.Example
Let's zoom in to the logs printed after the
ccommand was entered.You can see that all messages' subject are thread client objects, as most of the "actions" in the debugger happen around them. And the rest of the messages are plainly described in English so it's easy to understand, even for first-time readers.