Module aws_lambda_powertools.logging.utils
Functions
def copy_config_to_registered_loggers(source_logger: Logger, log_level: int | str | None = None, ignore_log_level=False, exclude: set[str] | None = None, include: 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
: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
:set[str] | None
, optional- List of logger names to include, by default all registered loggers are included
exclude
:set[str] | None
, optional- List of logger names to exclude, by default None