Skip to content

[Bug] Does not support semantic_logger #472

Closed

Description

@HoneyryderChuck

What are you really trying to do?

We use structured JSON logging. Default temporal SDK does not log in JSON format, nor it supports the default context that we require. Our Rails logger, via the semantic_logger gem, could do that.

Describe the bug

We try to override the logger, as per the docs, via:

Temporalio::Client.connect(
    host,
    'app',
    logger: Rails.logger,
)

this does not work however: Rails.logger delegates to an instance of SemanticLogger::Logger, which returns a symbol when the. #level method is called (this differs from the standard logger gem, for which a logger instance #level method returns an. integer). This eventually cascades to an error in this line, as level is expected to be an integer at that point.

Minimal Reproduction

Temporalio::Client.connect(
    host,
    'app',
    logger: SemanticLogger["MyApp"]
)

then try to log something in temporal.

Additional context

I understand the reasoning around supporting the perceived default, but unfortunately, in 2026 at least, I can't think of any production application that could rely solely on the standard logger gem, which does not support structured logging, and that's a standard requirement nowadays. I, like you, would like that all of these gems could at least agree on a common interface, but that's sadly not the case.

Activity

  1. added
    bug
    on Jul 2, 2026
  2. chris-olszewski commented on Jul 6, 2026

    @chris-olszewski
    Member

    In agreement, we should should support this. Would accept a PR as I can't promise we'll get to this immediately

  3. HoneyryderChuck commented on Jul 14, 2026

    @HoneyryderChuck
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions