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

Logging: add Logger.isLevelEnabled API #144002

Closed
pgayvallet opened this issue Oct 26, 2022 · 1 comment · Fixed by #144033
Closed

Logging: add Logger.isLevelEnabled API #144002

pgayvallet opened this issue Oct 26, 2022 · 1 comment · Fixed by #144033
Assignees
Labels
enhancement New value added to drive a business result Feature:Logging Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@pgayvallet
Copy link
Contributor

See #140014 for more context

We currently don't have a way to know if a given level is enabled for a given logger.

This can be very useful when the content of a log message consume resources (e.g performs calls to ES, has expensive computations...)

We should implement at least isLevelEnabled(level: LogLevel): boolean on our Logger interface and implementation.

The per method equivalents (isInfoEnabled, isDebugEnabled) could be added too.

@pgayvallet pgayvallet added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc enhancement New value added to drive a business result Feature:Logging labels Oct 26, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Logging Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants