swift-testing icon indicating copy to clipboard operation
swift-testing copied to clipboard

Configurable log prefix

Open finestructure opened this issue 1 year ago • 3 comments

Description

We are running test with lots of log output that are hard to run locally end-to-end, so we often have to rely on CI to get the results.

Getting these results is difficult because of how noisy the logs are. It'd be very helpful if we could set a custom prefix that is prepended to all testing output lines. That way we can filter/search the log chaos on a known string in the CI viewer and zero in on just the test failure output.

Would be great if this was a global config or even a per-test trait.

Expected behavior

Actual behavior

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

finestructure avatar Jun 12 '24 13:06 finestructure

I can do this pretty easily.

grynspan avatar Jun 12 '24 15:06 grynspan

--experimental-console-output-prefix ++ getenv("SWT_EXPERIMENTAL_CONSOLE_OUTPUT_PREFIX").

grynspan avatar Jun 12 '24 15:06 grynspan

Tracked internally as rdar://129677014.

grynspan avatar Mar 12 '25 18:03 grynspan