Skip to content

Add the receiver name as part of the logger name when logging overflows #361

Description

@llucax

What's needed?

When getting warnings about some receiver overflowing, there is no way to disable the logging only for the problematic receiver, if we disable the logging, no other receivers will log.

Proposed solution

Append the receiver name to the logger, like:

self.logger = logging.getLogger(f"{__name__}:{self.name}")
...

self.logger.warning("Overflow!")

Use cases

No response

Alternatives and workarounds

This is actually a poor's man version of structured logging.

Maybe it would be better to just start doing structured logging instead.

Additional context

Activity

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

    part:coreAffects the core types (`Sender`, `Receiver`, exceptions, etc.)type:enhancementNew feature or enhancement visitble to users

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions