mirror of
https://github.com/beetbox/beets.git
synced 2026-07-22 03:17:26 -04:00
Fix incorrect line numbers in logs
Because beets wraps `logging.Logger`, the default `stacklevel=1` incorrectly reports all log messages being emitted from `beets/logging.py:163` at the `super()._log()` callsite. Change the default to `stacklevel=2` so that the reported line numbers in debug logging are the actual logging callsites. Signed-off-by: Ross Williams <ross@ross-williams.net>
This commit is contained in:
@@ -152,7 +152,7 @@ class StrFormatLogger(Logger):
|
||||
exc_info: _ExcInfoType = None,
|
||||
extra: Mapping[str, Any] | None = None,
|
||||
stack_info: bool = False,
|
||||
stacklevel: int = 1,
|
||||
stacklevel: int = 2,
|
||||
**kwargs,
|
||||
):
|
||||
"""Log msg.format(*args, **kwargs)"""
|
||||
|
||||
Reference in New Issue
Block a user