From d0dce640a1706c1192463220490e2328ade7b8ee Mon Sep 17 00:00:00 2001 From: Pete Crocker Date: Sun, 9 Nov 2025 08:27:09 +0000 Subject: [PATCH] fix(cli): hide file paths in log output unless debug mode enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure RichHandler to only show file paths (e.g., object.py:568) when the --debug flag is used. This provides cleaner output for normal usage while preserving detailed logging for troubleshooting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- infrahub_sdk/ctl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrahub_sdk/ctl/utils.py b/infrahub_sdk/ctl/utils.py index 074a066e..d4fc6ee8 100644 --- a/infrahub_sdk/ctl/utils.py +++ b/infrahub_sdk/ctl/utils.py @@ -46,7 +46,7 @@ def init_logging(debug: bool = False) -> None: log_level = "DEBUG" if debug else "INFO" FORMAT = "%(message)s" - logging.basicConfig(level=log_level, format=FORMAT, datefmt="[%X]", handlers=[RichHandler()]) + logging.basicConfig(level=log_level, format=FORMAT, datefmt="[%X]", handlers=[RichHandler(show_path=debug)]) logging.getLogger("infrahubctl")