-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
part:coreAffects the core types (`Sender`, `Receiver`, exceptions, etc.)Affects the core types (`Sender`, `Receiver`, exceptions, etc.)type:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users
Milestone
Description
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
- Structured logging library for Python: https://github.com/hynek/structlog (I used it in the past and it is amazing)
Metadata
Metadata
Assignees
Labels
part:coreAffects the core types (`Sender`, `Receiver`, exceptions, etc.)Affects the core types (`Sender`, `Receiver`, exceptions, etc.)type:enhancementNew feature or enhancement visitble to usersNew feature or enhancement visitble to users