From e5d8b379ae39db328f102e724361eab93e9d89be Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 23 Jun 2026 12:29:24 +0200 Subject: utils: prettier log output --- cgitize/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cgitize/utils.py b/cgitize/utils.py index 37a8fcf..7a9596f 100644 --- a/cgitize/utils.py +++ b/cgitize/utils.py @@ -18,16 +18,17 @@ def setup_logging(verbose=False): logging.basicConfig( level=level, datefmt='%Y-%m-%d %H:%M:%S%z', - format='%(asctime)s | %(levelname)s | %(message)s', + # The 8 below is for "CRITICAL" + format='%(asctime)s | %(levelname)8s | %(message)s', # Log to stdout, because that's where subprocess's output goes (so that - # the don't get interleaved). + # they don't get interleaved). stream=sys.stdout, ) try: yield except Exception as e: logging.exception(e) - raise + sys.exit(1) def run(*args, capture_output=False, **kwargs): -- cgit v1.3