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
Enable debug globally if enabled in any server config #4007
Conversation
It was currently enabled only if the plugin debug was enabled in the last server config of the Corefile. Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #4007 +/- ##
==========================================
+ Coverage 56.85% 57.11% +0.25%
==========================================
Files 224 222 -2
Lines 11349 11277 -72
==========================================
- Hits 6453 6441 -12
+ Misses 4401 4346 -55
+ Partials 495 490 -5
Continue to review full report at Codecov.
|
I'm a bit confused the title says 'enable' but the patch only deals with disable? |
@miekg I hope #4006 explains better the issue 😊 The goal is to have the "debug mode" enabled if it is configured in one of the configuration blocks of a Corefile.
That's the issue I fix with this PR, by disabling "debug" ONLY IF it is not present in any configuration block. |
ack ,that explains it better. Can you think of a test to add? |
probably also warrants documentation changes in the debug readme to explain this global behavior |
Ok, I'll add documentation, and I will try to add tests if it makes sense. |
any luck? |
Sorry, I guess I will not have the time today, and then I'm in vacation for the next 2 weeks. I'll do it on August 17th. |
enjoy your holiday, I might kick off a smaller 1.7.1 release before that though, but then it will be in 1.7.2 or 1.8.0 |
Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
@miekg Sorry for the delay; I've finally updated the PR according to your comments. |
thanks! And merged! |
* Enable debug globally if enabled in any server config It was currently enabled only if the plugin debug was enabled in the last server config of the Corefile. Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com> * Add test and update debug's README Signed-off-by: Olivier Lemasle <o.lemasle@gmail.com>
1. Why is this pull request needed and what does it do?
Enable debug globally if enabled in any server config. It was currently enabled only if the plugin debug was enabled in the last server config of the Corefile.
This will still disable debug on reload, if debug is no more present.
Example with Corefile:
Logs (with debug message):
Remove
debug
in the Corefile and reload with SIGHUP1:Logs (with no more debug message):
2. Which issues (if any) are related?
Fixes #4006
3. Which documentation changes (if any) need to be made?
N/A
4. Does this introduce a backward incompatible change or deprecation?
No