OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Tweak log levels

Open enyst opened this issue 1 year ago • 2 comments

End-user friendly description of the problem this fixes or functionality that this introduces

  • [ ] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions

This PR proposes a few tweaks for log levels:

  • display once at info the action and the obs (ref slack)
  • send to debug channel most of logging in github.py since that is not active in most use cases and on local it sounds like something's wrong.

Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:f983c46-nikolaik   --name openhands-app-f983c46   ghcr.io/all-hands-ai/runtime:f983c46

enyst avatar Nov 04 '24 10:11 enyst

@enyst we need to keep actions and observations out of the default info logs, because they can contain (a) a LOT of information, and (b) private information

I'd support having an env var that swaps them from debug into info though, like LOG_ALL_EVENTS

rbren avatar Nov 04 '24 16:11 rbren

@enyst we need to keep actions and observations out of the default info logs, because they can contain (a) a LOT of information, and (b) private information

Okay. Oh, this is an issue on the hosted version, I suppose? On local it looks really strange to not tell the user anything.

Env var sounds good.

enyst avatar Nov 04 '24 19:11 enyst

Yeah I'd say it's an issue in any kind of multi-tenant environment.

Also, ideally, the UI would give you all this information, and the server logs should really just be there to know "is the server functioning properly." I think right now it's kind of a hacky way to gain the level of agent observability we want in the UI but don't have.

rbren avatar Nov 04 '24 22:11 rbren

On further thought, we already have other env vars changing the logging behavior, like LOG_TO_FILE and SKIP_CONTAINER_LOGS somewhere, adding another is not helping predictability. FWIW maybe I didn't lose track yet, but it's going to happen. 😅

Does this work though as a temporary measure? I think we need to think this over.

enyst avatar Nov 10 '24 13:11 enyst