Skip to content

Go SDK "Custom Logger" docs recommend deprecated logur library #4356

@ptdewey

Description

@ptdewey

Temporal Affiliation

  • I am a Temporal employee

Page URL

https://docs.temporal.io/develop/go/observability#custom-logger

Technical Issue

The custom-logger section recommends using the logur adapter package with a Logrus example.
This is now outdated, as the SDK now ships log.NewStructuredLogger() (added in v1.25.0, temporalio/sdk-go#1158) which wraps Go's standard slog.Logger and serves as the universal bridge to third-party loggers.

Suggested fix:

  • Replace the logur/Logrus example with log.NewStructuredLogger(slog.Default()) as the primary recommendation
  • Show how any logger that implements an slog.Handler (zap via zapslog, zerolog, etc.) can be bridged through slog
  • Mention the direct log.Logger interface implementation as an alternative, with a pointer to the https://github.com/temporalio/samples-go/blob/main/zapadapter/zap_adapter.go

I'd be happy to make a PR with the above corrections if that would be helpful.

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