Skip to content
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

Open
Tracked by #4701
ccressent opened this issue May 28, 2020 · 4 comments
Open
Tracked by #4701

Implement "facilities" and "selectors" to customize log output #3809

ccressent opened this issue May 28, 2020 · 4 comments
Labels
component:agent Sensu Agent improvements component:backend Sensu Backend improvements component:logging Sensu Go logging improvements enhancement

Comments

@ccressent
Copy link
Contributor

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 and sensu-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 from apid and error and above messages coming from schedulerd.

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.

@echlebek
Copy link
Contributor

echlebek commented Jun 2, 2020

I love it! And the proposal is completely backwards compatible with the current --log-level. ⭐

@calebhailey calebhailey added component:backend Sensu Backend improvements component:agent Sensu Agent improvements labels Jun 4, 2020
@stale
Copy link

stale bot commented Dec 1, 2020

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.

@stale stale bot added the wontfix label Dec 1, 2020
@stale stale bot closed this as completed Dec 8, 2020
@calebhailey calebhailey reopened this Mar 29, 2021
@calebhailey
Copy link

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. 🤞

@calebhailey
Copy link

Related: #4308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:agent Sensu Agent improvements component:backend Sensu Backend improvements component:logging Sensu Go logging improvements enhancement
Projects
None yet
Development

No branches or pull requests

3 participants