-
Notifications
You must be signed in to change notification settings - Fork 175
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
Implement "facilities" and "selectors" to customize log output #3809
Comments
I love it! And the proposal is completely backwards compatible with the current |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still relevant! I love this proposal. 💪 TBD on prioritization, but we have a number of customer requests that I'm hoping we could begin to address with the right plan around a gradual implementation here. 🤞 |
Related: #4308 |
Feature Suggestion
Given the number of different components that can output log messages in Sensu, it might make sense to introduce the concepts of "facility" and "selector". These concepts would be loosely modeled on the syslog protocol and the syslogd implementation.
A facility is essentially a Sensu component. A selector is essentially the combination of a component and a log level.
We already have named loggers for various components. We should be able to individually configure them so that one can tailor the log output to their needs.
This is mainly relevant for
sensu-backend
andsensu-agent
.Possible Implementation
Keep using the currently implemented Logrus named loggers, but implement a system to individually configure them, be it on the command line or the configuration file.
For example,
--log-level apid.info,scheduler.error
would only output info and above messages coming fromapid
and error and above messages coming fromschedulerd
.Context
I'm trying to think of ways to give users and developers a better way to get the information they need out of the logs.
The text was updated successfully, but these errors were encountered: