cli icon indicating copy to clipboard operation
cli copied to clipboard

[Feature Request] Allow server startup logging to be disabled or rewritten

Open julioz opened this issue 7 months ago • 4 comments

Is your feature request related to a problem? Please describe.

When using the Temporal Typescript SDK, and starting a local workflow environment for local development with:

TestWorkflowEnvironment.createLocal(...)

The server outputs text to the console. Every time I start my application or run my tests I see:

...
CLI 1.4.1 (Server 1.28.0, UI 2.39.0)

Server:  localhost:63201
UI:      http://localhost:64201
Metrics: http://localhost:63205/metrics

...

Besides being too verbose for my test outputs, it also confuses engineers in my organization; they tend to copy these URLs to issue requests against, when in reality our application server runs on another port. There is no indication that these logs come from Temporal, nor a way to rewrite them or disable them altogether.

Describe the solution you'd like

Any mechanism to change the logging of the local temporal environment would help. If that's not possible, a way to disable that output. Ideally, I would prefer if the output was:

...
Temporal CLI 1.4.1 (Server 1.28.0, UI 2.39.0)

Temporal Server:  localhost:63201
Temporal UI:      http://localhost:64201
Temporal Metrics: http://localhost:63205/metrics

...

But I'd also like to be able to disable them when running integration tests.

Additional context

I've navigated through Temporal's GitHub organization and found that these logs are produced here. I could not find a way to pass in a DevServerConfig in a way that allows me to control that output.

julioz avatar Jul 25 '25 10:07 julioz

The CLI doesn't provide any way to disable that specific message. There's nothing the SDK can do about this.

I'm transferring your request to the CLI project.

mjameswh avatar Jul 25 '25 15:07 mjameswh

Thanks for reporting, we will triage.

bergundy avatar Jul 25 '25 15:07 bergundy

You can pass -o none and not log any non-logging output which includes this output. This might be something like TestWorkflowEnvironment.createLocal({ server: { extraArgs: ['-o', 'none'] } }) in TypeScript, untested. Arguably SDKs should consider setting this by default (does not affect logs, would have to check if it'd suppress errors).

cretz avatar Jul 25 '25 21:07 cretz

@cretz Indeed, passing extraArgs to the CLI helps omitting the output:

  const testEnv = await TestWorkflowEnvironment.createLocal({
    server: {
      extraArgs: ["-o", "none"],
    },
  });

I wonder if we'd be missing something else relevant from the CLI lifecycle given this would be an 'all-or-nothing' solution.

julioz avatar Jul 26 '25 08:07 julioz