Closed nsingh-branch closed 7 months ago
Attention: 153 lines
in your changes are missing coverage. Please review.
Comparison is base (
9a0722e
) 50.60% compared to head (1c4df07
) 50.94%. Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Reference
SDK-2163 -- Replace BNCLog with a simpler class based solution
Summary
This PR introduces a new logging class,
BranchLogger
, designed to replace the existingBNCLog
utility. The goal is to simplify logging within the SDK by providing a clear, straightforward way to log messages at different levels (Debug, Info, Warning, Error), support conditional logging based on the set log level threshold, and provide clients with a log callback.This is phase one of this change which is just creating the new class and implementing it in a few places. Once approved, the next phase will remove the existing
BNCLog
class and replace all of its usage withBranchLogger
.Motivation
The motivation behind this change is to make it easier to log at different levels throughout the SDK and replace the old BNCLog class. Additionally, this change provide clients with new features like enabling logs only above a certain level and the ability to receive logs via a callbacks instead.
Type Of Change
Testing Instructions
[[Branch getInstance] enableLogging]
or the new[[Branch getInstance] enableLoggingAtLevel:BranchLogLevelVerbose]
;cc @BranchMetrics/saas-sdk-devs for visibility.