Skip to content

[Feature Request] Per-Worker Logger #1867

@TastyPi

Description

@TastyPi

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

When we run tests, we create a new Temporal Namespace for each test, and have that test's Worker connect to that namespace. This ensures tests can be run in parallel while being isolated from each other.

It also means we have a Worker per test. There are some things related to logs that we would like to be able to test, for example:

  • Assert on log output
  • Suppress Activity failure logs when they are expected

However, because the logger is configured by Runtime.install, which is global, it is not possible to have multiple Workers running in the same process using different logger instances so we can have per-test behaviour.

Describe the solution you'd like

Allow the Logger to be configured at the Worker level. This would allow us to create a "test logger" instance for each test to enable what we want.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions