Skip to content

Commit 993b907

Browse files
committed
Revert "Make logHandler print to stdout instead of stderr"
This reverts commit 6fbddd4.
1 parent eb27349 commit 993b907

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Sources/SKLogging/NonDarwinLogging.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,7 @@ actor LogHandlerActor {
281281

282282
/// The handler that is called to log a message from `NonDarwinLogger` unless `overrideLogHandler` is set on the logger.
283283
@LogHandlerActor
284-
var logHandler: @Sendable (String) async -> Void = { message in
285-
// Print to stdout. When using the sourcekit-lsp binary, we will have stdout redirected to stderr, so it ends up
286-
// logging to stderr. During test execution, we log to stdout, which is generally better handled than logging to
287-
// stderr by XCTest (for some reason logging to stderr will hang test execution when running tests in parallel).
288-
print(message + "\n")
289-
}
284+
var logHandler: @Sendable (String) async -> Void = { fputs($0 + "\n", stderr) }
290285

291286
/// The queue on which we log messages.
292287
///

0 commit comments

Comments
 (0)