launchdarkly / swift-eventsource

Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
https://launchdarkly.github.io/swift-eventsource/
Other
187 stars 34 forks source link

feat: adds ability to provide a OSLog instance via the Config.logger property #78

Closed tanderson-ld closed 3 months ago

tanderson-ld commented 3 months ago

Related issues

SC-245493

Describe the solution you've provided

Added Config.logger property that is only available on platforms supporting OSLog.

Describe alternatives you've considered

Creating a LD specific protocol for logging and exposing that. Customer's would then have to implement an adapter for this. This was rejected as adding more logging flavors to the ecosystem is probably a worse outcome.

Additional context

Logging was previously a no-op on Linux and Windows, and that continues to be the case.