-
-
Notifications
You must be signed in to change notification settings - Fork 455
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 Command to Set Logging/Filter Rules at Runtime #4637
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.
Small nitpicks, otherwise looks good 👍 Thank you
@@ -3211,6 +3212,8 @@ void CommandController::initialize(Settings &, Paths &paths) | |||
|
|||
this->registerCommand("/shield", &commands::shieldModeOn); | |||
this->registerCommand("/shieldoff", &commands::shieldModeOff); | |||
|
|||
this->registerCommand("/c2:loggingrules", &commands::setLoggingRules); |
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.
Naming is the hardest part - I think I would prefer /c2-set-logging-rules
but happy to discuss it further before merging this in
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.
Sounds like a good name to me.
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.
I'd love for us to come up with some convention for release-debug and debug-only commands. I typically use /debug-
for release-debug.
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.
clang-tidy made some suggestions
Should've checked the docs a bit more.
Thank you! |
Description
This PR adds the
/c2:loggingrules
command. You invoke it like this:/c2:loggingrules chatterino.*.debug=true chatterino.http.debug=false
. This will apply both rules. I'm not too sure about the command name/prefix/namespace (my thinking was to have this behind a namespace/prefix, so it's clear that this is a Chatterino command).This command is mainly for debugging release builds without restarting - so that you get more logs when you attach a debugger/console or even a dedicated program capturing logs.