Fix: Consolidate multi-line error logs into single-line JSON format (#11249)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig 2025-10-06 13:16:58 -04:00 committed by GitHub
parent 08118d742b
commit d1f8877600
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -376,6 +376,10 @@ if current_log_level == logging.DEBUG:
if LOG_JSON:
openhands_logger.addHandler(json_log_handler(current_log_level))
# Configure concurrent.futures logger to use JSON formatting as well
cf_logger = logging.getLogger('concurrent.futures')
cf_logger.setLevel(current_log_level)
cf_logger.addHandler(json_log_handler(current_log_level))
else:
openhands_logger.addHandler(get_console_handler(current_log_level))