Swift is still sometimes so cumbersome

@clayellis the improvements to Apple-specific os_log APIs detailed in that post is under development. A prototype implementation of the API is now available in stdlib/private directory: swift/stdlib/private/OSLog at main · apple/swift · GitHub. (The implementation is not yet complete.) Compiler support for optimizing these APIs is mainly implemented by this pass: swift/OSLogOptimization.cpp at main · apple/swift · GitHub. However, neither the optimization pass nor the APIs are stable at this point and is a work in progress. The API names have been changed so they are more aligned with swift-log as discussed in this post: Logging levels for Swift's server-side logging APIs and new os_log APIs.

3 Likes