Skip to content

copy_config_to_registered_loggers does not exclude source_logger by default #999

Closed
@houbie

Description

@houbie

When calling copy_config_to_registered_loggers(source_logger) without explicit exclude, the source_logger is not correctly excluded.

Expected Behavior

The source_logger is excluded

Current Behavior

The source_logger name is split in letters that get all excluded

Solution

the set constructor in aws_lambda_powertools/logging/utils.py creates a set containing all the letters of the log name
exclude = set(source_logger.name)
this can be fixed with a set literal: exclude = { source_logger.name }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions