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.
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_loggergem, could do that.Describe the bug
We try to override the logger, as per the docs, via:
this does not work however:
Rails.loggerdelegates to an instance of SemanticLogger::Logger, which returns a symbol when the.#levelmethod is called (this differs from the standard logger gem, for which a logger instance#levelmethod returns an. integer). This eventually cascades to an error in this line, aslevelis expected to be an integer at that point.Minimal Reproduction
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
loggergem, 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.