diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-23 12:29:24 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-23 12:29:24 +0200 |
| commit | e5d8b379ae39db328f102e724361eab93e9d89be (patch) | |
| tree | b12c50c0a4a7d83139ce134d633d895fae811e7f | |
| parent | workflows/maintenance: fix a link (diff) | |
| download | cgitize-e5d8b379ae39db328f102e724361eab93e9d89be.tar.gz cgitize-e5d8b379ae39db328f102e724361eab93e9d89be.zip | |
utils: prettier log output
| -rw-r--r-- | cgitize/utils.py | 7 |
1 files 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): |
