Skip to content

Add JSON logger support #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON Logger support.
2 participants