Closed jaanus closed 1 year ago
That is a very good idea. Thanks for that. I'll double check if os_log
is also available on Linux
Good point. os_log
isn’t available on Linux. https://github.com/apple/swift-log is the official thing to use on Linux. (And I suppose it works on other platforms too, some Server-Side Swift things like Vapor use it across all platforms, so AppTelemetry might too.)
SwiftLog has the added ability of aggregating and sending logs up to a remote server for error monitoring.
I'm not sure it makes sense for this SDK to add a dependency though, and indeed it complicated the recent CocoaPods install.
Perhaps we support clients providing a simple log closure, defaulting to print if not overridden?
Perhaps we support clients providing a simple log closure, defaulting to print if not overridden?
Yay for dependency injection. This sounds fine.
Observed: Telemetry uses print-logging.
Expected:
os_log
is the modern recommended way of logging. Consider using that. https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code