mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 23:09:55 +01:00
__name__ looks something like `dvc.commands.diff`, but if we are already instantiating root logger with `dvc`, it adds up to create something like `dvc.dvc.commands.diff`. We should be using a root logger here instead.
11 lines
276 B
Python
11 lines
276 B
Python
# using a separate module instead of using `dvc.logger` to not create an import-cycle.
|
|
import logging
|
|
|
|
|
|
class LoggerWithTrace(logging.Logger):
|
|
# only for type checking
|
|
trace = logging.debug
|
|
|
|
|
|
logger: "LoggerWithTrace" = logging.getLogger() # type: ignore[assignment]
|