-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 feature to tune log levels for individual subsystems #16665
Conversation
1300dcd
to
8a65a49
Compare
8be3c67
to
ffe6dc0
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.
Great work here! I have wanted this many times myself.
One bikeshed comment would be about the "sublevel" naming. Is that naming a shortened form of subsystem log level? I would probably find something with subsystem or component in the name easier to intuit its use.
Would |
a3f4f1d
to
7c1bddb
Compare
@kisunji : It looks like this allows modifying a subsystem log level at startup. Does it make sense to extend this same functionality to |
0ff1548
to
c01ee5e
Compare
03d0152
to
98532c9
Compare
283082a
to
383d4ba
Compare
383d4ba
to
5a10aff
Compare
Although I don't super mind either way, just a preference. |
5a10aff
to
a71bfba
Compare
This pull request has been automatically flagged for inactivity because it has not been acted upon in the last 60 days. It will be closed if no new activity occurs in the next 30 days. Please feel free to re-open to resurrect the change if you feel this has happened by mistake. Thank you for your contributions. |
Don't have time to bring this over the finish line but potential improvements:
|
Closing this PR as stale for now, but hoping we can return to it if need arises in the future as this was a really nice improvement. |
Description
Adds
log_sublevels
configuration which can fine-tune the log verbosity of individual subcomponents in Consul. This will help users selectively suppress subsystems they may find noisy or help debug certain subsystems by allowing for fine-grained TRACE logs.Future work
This configuration is not yet reloadable
Examples
Default info logging
Trace logging makes all subcomponents noisy
Fine-grained trace logging for
agent.server.peering-syncer
Limitations
This feature depends on the root Consul logger (named
agent
) being the parent in the sublogger tree. Some Consul components may use independently created loggers which do not inherit the configuration OR may not be using named subloggers.Testing & Reproduction steps
PR Checklist