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:
skshetry
2023-11-10 15:54:08 +05:45
committed by GitHub
parent 0def298b8c
commit b2fc194e2b
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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
View File
@@ -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]