ably-cocoa
ably-cocoa copied to clipboard
Create a way to link public API invocations to their eventual outputs
Background
In #1655 we added log statements which are emitted whenever a public API method is invoked.
Many of these method invocations will eventually provide some sort of output to the caller, namely:
- they will return a value (and possibly also pass an error via an
NSError **
argument), or - they will invoke a callback
In #1656 and #1657 we will want to log these outputs. As part of doing so, we would like to identity the specific method invocation that these log outputs relate to, so that a reader of the logs can match this message up to the log message that was emitted when the method was called.
Logging API considerations (falls under #1617)
We could update the ARTLogPublicAPICall
macro suggested in #1655 so that it returns some sort of unique identifier (a UUID, probably) for that specific invocation of the method, and so that it also logs this identifier. Then, in #1656 and #1657, we will include this identifier as part of the log messages that are emitted when a value is returned or a callback invoked.
Depends on
- #1655