Skip to content

[BUG] HATCHET_CLIENT_LOG_LEVEL is unused #3008

@gregfurman

Description

@gregfurman

Describe the issue

When running a hatchet task via the client, setting the HATCHET_CLIENT_LOG_LEVEL has no effect on the log level or format.

While the docs indicate that the worker's log level is INFO and can be configured i.e

| `HATCHET_CLIENT_LOG_LEVEL` | Log level for the worker | `INFO` |

The log level defaults to DEBUG and is always in JSON format due to NewDefaultLogger always being used to set the default logger.

logger := logger.NewDefaultLogger("client")

The solution here is instead, to attach a shared.LoggerConfigFile to the client config and pass it to a logger.NewStdErr.

Environment

  • SDK: Golang v0.78.22

Expected behavior

The log level (and optionally the format) should be configurable via environment variables or config.

Code to Reproduce, Logs, or Screenshots

Run the simple workflow in examples/go/simple against a hatchet instance.

$ env $(cat .env | xargs) HATCHET_CLIENT_LOG_LEVEL=warn go run main.go

See how the client logs are at the debug level despite HATCHET_CLIENT_LOG_LEVEL=warn

{"level":"debug","service":"client","time":"2026-02-12T17:44:15.075533+02:00","message":"connecting to 127.0.0.1:7070 without TLS"}
{"level":"info","service":"client","time":"2026-02-12T17:44:15.075715+02:00","message":"gzip compression enabled for gRPC client"}
{"level":"debug","service":"worker","time":"2026-02-12T17:44:15.088879+02:00","message":"worker simple-worker is listening for actions: [process-message:process-message]"}
{"level":"debug","service":"client","time":"2026-02-12T17:44:15.088894+02:00","message":"No compute configs found, skipping cloud registration and running all actions locally."}
{"level":"debug","service":"client","time":"2026-02-12T17:44:15.099349+02:00","message":"Registered worker with id: 236810e7-3aca-4468-9083-fcf9ddb4674f"}
{"level":"debug","service":"client","time":"2026-02-12T17:44:15.099534+02:00","message":"Starting to listen for actions"}
{"level":"debug","service":"client","time":"2026-02-12T17:44:15.20062+02:00","message":"updating worker 236810e7-3aca-4468-9083-fcf9ddb4674f heartbeat"}

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions