Skip to content

Log output not interleaved with XCTest output #44

@pitfield

Description

@pitfield

In Swift 5.6.1 (Xcode 13.4.1), when running the test suite from the command line, the PostgresClientKit log output is not properly interleaved with the XCTest output. Instead, the log output appears after all XCTest output. This makes it difficult to correlate the log output to specific tests.

I'm not seeing this when running the test suite within Xcode or on Linux.

By default, LogHandler emits log output to stdout using print(...). It appears that print(...) is now buffering output, which is why the log output is not immediately visible.

Replacing print(...) with FileHandle.standardOutput.write(:_) seems to do the trick.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions