From 9bf9a9f1f1d4840b77fbc02210d21516ad507362 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 21 Jun 2026 18:09:53 -0700 Subject: [PATCH] fix(swe-runner): move logging.basicConfig out of Runner __init__ into main Same library-code anti-pattern as the compressor fix: MiniSWERunner.__init__ called logging.basicConfig(), overriding the application's root logger config every time a runner was instantiated. Moved the call into main() (the CLI entry point) where it belongs; __init__ now only does getLogger(__name__). Standalone verbose logging is preserved. --- mini_swe_runner.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mini_swe_runner.py b/mini_swe_runner.py index 95a2cc728..2853abc9a 100644 --- a/mini_swe_runner.py +++ b/mini_swe_runner.py @@ -194,12 +194,6 @@ class MiniSWERunner: self.image = image self.cwd = cwd - # Setup logging - logging.basicConfig( - level=logging.DEBUG if verbose else logging.INFO, - format='%(asctime)s - %(levelname)s - %(message)s', - datefmt='%H:%M:%S' - ) self.logger = logging.getLogger(__name__) # Initialize LLM client via centralized provider router. @@ -677,6 +671,13 @@ def main( print("🚀 Mini-SWE Runner with Hermes Trajectory Format") print("=" * 60) + # Configure root logging at the entry point (not in library __init__). + logging.basicConfig( + level=logging.DEBUG if verbose else logging.INFO, + format='%(asctime)s - %(levelname)s - %(message)s', + datefmt='%H:%M:%S' + ) + # Initialize runner runner = MiniSWERunner( model=model,