about summary refs log tree commit diff stats
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-07-03 14:16:12 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-07-03 14:16:12 +0300
commit4bc6ddf6a360a62d214e20c8dd8021dddd2435d6 (patch)
treec435ef03eee8a3960da71b187103b4d12d086580 /scripts
parent110bcfe93224435da5aa683e87e0eb28d9938ec0 (diff)
downloadfungus-launcher-4bc6ddf6a360a62d214e20c8dd8021dddd2435d6.tar.gz
fungus-launcher-4bc6ddf6a360a62d214e20c8dd8021dddd2435d6.tar.xz
switch print() to proper logging
Diffstat (limited to 'scripts')
-rw-r--r--scripts/check_handlers.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/check_handlers.py b/scripts/check_handlers.py
index 24b550b..f888f19 100644
--- a/scripts/check_handlers.py
+++ b/scripts/check_handlers.py
@@ -13,10 +13,17 @@ Exit code 0 = clean, 1 = issues found.
 """
 
 import ast
+import logging
 import re
 import sys
 from pathlib import Path
 
+logging.basicConfig(
+    format="[%(name)s] %(levelname)s %(message)s",
+    level=logging.INFO,
+    stream=sys.stderr,
+)
+
 
 # ---------------------------------------------------------------------------
 # AST-based class / method extraction (with inheritance resolution)
@@ -206,11 +213,11 @@ def main():
         all_errors.extend(errors)
 
     if all_errors:
-        print("\n".join(all_errors))
-        print(f"\n--- {len(all_errors)} issue(s) found ---")
+        logging.error("\n".join(all_errors))
+        logging.error("--- %d issue(s) found ---", len(all_errors))
         sys.exit(1)
     else:
-        print("All connect() handlers and widget references validated successfully.")
+        logging.info("All connect() handlers and widget references validated successfully.")
         sys.exit(0)