Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Conversation

@erkinalp
Copy link
Contributor

Description

This PR adds support for JSON logging when LOG_JSON environment variable is set to true.

Related Issue

Fixes #120

Motivation and Context

In OpenHands, setting LOG_JSON=true enables JSON logging output. However, the openhands-aci logs do not support this format.

How Has This Been Tested?

Added unit tests for the JSON formatter and manually tested with LOG_JSON=true/false.

Does this PR introduce a breaking change?

No.

Copy link
Contributor Author

This PR addresses issue #120 by adding JSON logging support to openhands-aci.

Copy link
Contributor Author

I have fixed the linting issues:

  1. Added type annotation to fix mypy error about incompatible types in assignment
  2. Fixed formatting issues with trailing whitespace and end-of-file
  3. Fixed ruff formatting issues with quotes and whitespace

All pre-commit hooks now pass successfully.

Copy link
Contributor

@raymyers raymyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya sorry we didn't see this, thanks for putting it in. I think we might be able to handle this better by making the logger on OpenHands side add its handler, I'm going to try that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON Logger support.

3 participants