-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some of our "multiplexer" instances for logging (`Log.MultiLogger`), analytics (`Analytics.MultiTracker`) and performance metrics (`PerformanceMetrics.MultiTracker`) require type erasure on the child elements to which they forward events, causing the setup to be cumbersome and not intuitive. By leveraging result builders we can make this a bit smoother to users by abstracting/automating the type erasure "dance". Furthermore, it unlocks control flow (e.g. `if/else`, `for ... in`, `if #available`) which allows more advanced setups to be defined directly in the builder. ## Changes - Add result builders to facilitate instantiating certain "multiplexer" instances, most notably the ones that require type erasure: + `Log.MultiLogger` (requires erasing to `AnyMetadataLogDestination`) + `Analytics.MultiTracker` (requires erasing to `AnyAnalyticsTracker`) + `PerformanceMetrics.MultiTracker` (doesn't require erasing) - Add relevant UTs.
- Loading branch information
Showing
10 changed files
with
398 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.