kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.25k stars 296 forks source link

How to log to LoggerStore.shared with strict concurrency checking enabled? #226

Closed erichoracek closed 4 months ago

erichoracek commented 9 months ago

As far as I can tell, it's not possible to log to the default LoggerStore.shared when you have strict concurrency checking enabled. It produces the following warning, as LoggerStore.shared is globally-mutable state that could theoretically be changed out from under you while accessing it, and static var is not thread-safe:

image
erichoracek commented 4 months ago

Fixed in 4.1.1 in this commit https://github.com/kean/Pulse/commit/f098b456b4cd292f4e387da0f41c0ae687d67245