Skip to content

copy_config_to_registered_loggers does not exclude source_logger by default #999

Closed

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 }

Activity

  1. added
    bug
    triage
    on Feb 4, 2022
  2. heitorlessa commented on Feb 4, 2022

    @heitorlessa
    Contributor

    Thanks a lot for spotting this pesky bug @houbie!

    Would you be able to create a quick PR fix for that? We can fast track this for the upcoming release

    Cc @mploski

  3. mploski commented on Feb 4, 2022

    @mploski
    Contributor

    @houbie Thanks for spotting this one! I guess it would be great to write unit-test against it also to ensure we won't have regression in the future.

  4. removed
    triage
    on Feb 4, 2022
  5. heitorlessa commented on Feb 4, 2022

    @heitorlessa
    Contributor

    Just merged and should be out early next week the latest with many other papercuts addressed - thank you so much @houbie !

    Even more so being your first contribution :) 🎉

  6. added
    pending-release
    on Feb 4, 2022
  7. github-actions commented on Feb 9, 2022

    @github-actions
    Contributor

    This is now released under 1.25.0 version!

  8. removed
    pending-release
    on Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions