mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
fix name of the loggers used (#10085)
__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.
This commit is contained in:
@@ -12,6 +12,9 @@ from dvc.log import logger
|
|||||||
"".encode("idna")
|
"".encode("idna")
|
||||||
|
|
||||||
|
|
||||||
|
logger = logger.getChild(__name__)
|
||||||
|
|
||||||
|
|
||||||
class DvcParserError(Exception):
|
class DvcParserError(Exception):
|
||||||
"""Base class for CLI parser errors."""
|
"""Base class for CLI parser errors."""
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,4 +7,4 @@ class LoggerWithTrace(logging.Logger):
|
|||||||
trace = logging.debug
|
trace = logging.debug
|
||||||
|
|
||||||
|
|
||||||
logger: "LoggerWithTrace" = logging.getLogger("dvc") # type: ignore[assignment]
|
logger: "LoggerWithTrace" = logging.getLogger() # type: ignore[assignment]
|
||||||
|
|||||||
Reference in New Issue
Block a user