From 31b44f75b5d0acf99007290a6d204f4f49039534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20St=C3=B6ckli?= Date: Wed, 22 Oct 2025 13:05:21 +0000 Subject: [PATCH] log messages on ERROR level in task agent to console --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index fbb329f..912e884 100644 --- a/main.py +++ b/main.py @@ -44,6 +44,11 @@ log_file_handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')) logging.getLogger('').addHandler(log_file_handler) +console_handler = logging.StreamHandler() +console_handler.setLevel(logging.ERROR) # log only ERROR and above to console +console_handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s')) +logging.getLogger('').addHandler(console_handler) + DEFAULT_MAX_TURNS = 50 RATE_LIMIT_BACKOFF = 5 MAX_RATE_LIMIT_BACKOFF = 120