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

Add endpoints to provide ability to modify logging verbosity #16111

Merged
merged 12 commits into from
Jun 27, 2022

Conversation

ccapurso
Copy link
Contributor

@ccapurso ccapurso commented Jun 22, 2022

This PR introduces some endpoints to allow users to modify the logging verbosity of all loggers or an individual logger. One prerequisite of this is to ensure that the base logger that Vault uses is initialized using IndependentLevels so that individual loggers can be modified.

The two endpoints that have been introduced are sys/loggers (all loggers) and sys/loggers/:name (an individual logger, e.g. core). Each support a POST and DELETE to modify and revert back to Vault configuration, respectively.

There were a handful of loggers that were not accounted for in Core.allLoggers so I have added calls to Core.AddLogger for them. I performed an audit of calls to logger.Named to ensure the ones that I did add made sense to track. There are many short-lived loggers which have been deliberately left out.

This PR also includes a new doc page to outline the new endpoints.

@ccapurso ccapurso changed the title Vault 6244 log level api Add endpoints to provide ability to modify logging verbosity Jun 22, 2022
vault/logical_system.go Outdated Show resolved Hide resolved
@ccapurso ccapurso marked this pull request as ready for review June 24, 2022 13:54
@ncabatoff ncabatoff self-requested a review June 27, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants