Skip to content

[Bug] Does not support semantic_logger #472

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions