Module aws_lambda_powertools.logging.utils

Functions

def copy_config_to_registered_loggers(source_logger: Logger, log_level: Union[int, str, ForwardRef(None)] = None, ignore_log_level=False, exclude: Optional[Set[str]] = None, include: Optional[Set[str]] = None) ‑> None

Copies source Logger level and handler to all registered loggers for consistent formatting.

Parameters

ignore_log_level
 
source_logger : Logger
Powertools for AWS Lambda (Python) Logger to copy configuration from
log_level : Union[int, str], optional
Logging level to set to registered loggers, by default uses source_logger logging level
ignore_log_level : bool
Whether to not touch log levels for discovered loggers. log_level param is disregarded when this is set.
include : Optional[Set[str]], optional
List of logger names to include, by default all registered loggers are included
exclude : Optional[Set[str]], optional
List of logger names to exclude, by default None