diff --git a/Sources/StreamCore/Logger/Logger.swift b/Sources/StreamCore/Logger/Logger.swift index 1ca8f40..1840da8 100644 --- a/Sources/StreamCore/Logger/Logger.swift +++ b/Sources/StreamCore/Logger/Logger.swift @@ -436,7 +436,7 @@ public enum LogConfig { } /// Entity used for logging messages. -open class Logger { +open class Logger: @unchecked Sendable { /// Identifier of the Logger. Will be visible if a destination has `showIdentifiers` enabled. public let identifier: String diff --git a/Tests/StreamCoreTests/Logger/Logger_Tests.swift b/Tests/StreamCoreTests/Logger/Logger_Tests.swift index da06be1..384d2a5 100644 --- a/Tests/StreamCoreTests/Logger/Logger_Tests.swift +++ b/Tests/StreamCoreTests/Logger/Logger_Tests.swift @@ -2,10 +2,37 @@ // Copyright © 2026 Stream.io Inc. All rights reserved. // +import Foundation @testable import StreamCore import Testing struct Logger_Tests { + @Test func concurrentLoggingProcessesAllMessages() async throws { + let iterations = 200 + let destination = CapturingDestination() + let logger = Logger(identifier: "test", destinations: [destination]) + + await withTaskGroup(of: Void.self) { group in + for index in 0..