Skip to main content

has_level_handler

Check if there is a handler in the logging chain that will handle the given logger's :meth:effective level < ~logging.Logger.getEffectiveLevel >.

def has_level_handler(
logger: logging.Logger
) - > bool

Check if there is a handler in the logging chain that will handle the given logger's :meth:effective level < ~logging.Logger.getEffectiveLevel >.

Parameters

NameTypeDescription
loggerlogging.LoggerThe logger instance to inspect for compatible handlers within its propagation hierarchy

Returns

TypeDescription
boolTrue if a handler exists in the logger or its parents that is configured to process the logger's effective severity level, False otherwise