Task: Python Logging - Ensure a Handler is Added Only Once
Task: Python Logging - Ensure a Handler is Added Only Once: a task in Terminal-Lego-15k (Harbor dataset). When configuring Python logging, it's common to encounter a situation where logger initialization code is called multiple times (e.g., in a function that gets invoked repeatedly). This leads…
The task
When configuring Python logging, it's common to encounter a situation where logger initialization code is called multiple times (e.g., in a function that gets invoked repeatedly). This leads to duplicate handlers being added to the logger, which causes duplicate log messages to be written.
Part of PrimeIntellect/Terminal-Lego-15k.