Logging: add Logger.isLevelEnabled
API
#144002
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
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 ourLogger
interface and implementation.The per method equivalents (
isInfoEnabled
,isDebugEnabled
) could be added too.The text was updated successfully, but these errors were encountered: