Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Sources/Logging/Handlers/StreamLogHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,13 @@ internal struct StdioOutputStream: TextOutputStream, @unchecked Sendable {
)
#elseif canImport(WASILibc)
// no file locking on WASI
#if compiler(>=6.5)
let file = WASILibc.stderr
#else
let file = WASILibc.stderr!
#endif
return StdioOutputStream(
file: WASILibc.stderr!,
file: file,
flushMode: .always,
lock: nil,
unlock: nil,
Expand Down Expand Up @@ -417,8 +422,13 @@ internal struct StdioOutputStream: TextOutputStream, @unchecked Sendable {
)
#elseif canImport(WASILibc)
// no file locking on WASI
#if compiler(>=6.5)
let file = WASILibc.stdout
#else
let file = WASILibc.stdout!
#endif
return StdioOutputStream(
file: WASILibc.stdout!,
file: file,
flushMode: .always,
lock: nil,
unlock: nil,
Expand Down
Loading