ably / ably-asset-tracking-swift

iOS client SDKs for the Ably Asset Tracking service.
Apache License 2.0
9 stars 6 forks source link

LogParser: Properly extract the message and error description from example app logs #516

Closed lawrence-forooghian closed 1 year ago

lawrence-forooghian commented 1 year ago

This removes this caveat from ExampleAppSDKLogLine#message:

The SDKLogMessage/message of this value is not necessarily the exact value that was passed as the message argument of AblyAssetTrackingCore’s LogHandler.logMessage(level:message:error:). It may contain a suffix added by the example apps’ log handlers, to add a trailing full stop and information about the error argument.

Now, #message contains the exact value passed as the message argument to LogHandler.logMessage(level:message:error:), and #errorDescription contains the localizedDescription of the error passed as the error argument to that method.

I want access to the exact log message emitted by the SDK, without any additional characters, so that I can for example emit some JSON in a log message from the SDK and then parse this JSON in an app that reads the logs.