mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 16:19:05 +08:00
Switch the agent-server to LOG_JSON=true so the Python SDK emits one JSON object per log record instead of Rich-formatted output. Rich was wrapping long lines across multiple entries and prepending its own timestamp on top of the HH:MM:SS [agent-server] prefix that logService already provides. Add parseAgentServerLogLine() which turns each JSON record into a clean single-line string: INFO 127.0.0.1:51658 - "GET /api/..." 200 h11_impl.py:481 Level-based ANSI colouring is also applied (dim for DEBUG, yellow for WARNING, red for ERROR/CRITICAL, blue for INFO) so errors still stand out. Non-JSON lines (e.g. startup text) fall back to the original yellow stderr / service-colour stdout behaviour unchanged. Co-authored-by: openhands <openhands@all-hands.dev>