💬 enable new debug logging format in rich handler

This commit is contained in:
oskvr37
2025-02-13 12:39:33 +01:00
parent 4289875599
commit 92f3feda2e
+11 -2
View File
@@ -36,11 +36,20 @@ def cli(ctx: Context, verbose: bool, quiet: bool, no_cache: bool):
)
)
rich_handler = RichHandler(console=ctx.obj.console, rich_tracebacks=True)
rich_handler.setLevel(
LEVEL = (
logging.DEBUG if verbose else logging.ERROR if quiet else logging.INFO
)
rich_handler = RichHandler(console=ctx.obj.console, rich_tracebacks=True)
rich_handler.setLevel(LEVEL)
if LEVEL == logging.DEBUG:
rich_handler.setFormatter(
logging.Formatter(
"[%(name)s.%(funcName)s] %(message)s", datefmt="[%X]"
)
)
logging.basicConfig(
level=logging.DEBUG,
handlers=[