99#import " AdobeBranchExtension.h"
1010#import " AdobeBranchExtensionConfig.h"
1111#import < BranchSDK/Branch.h>
12- #import < BranchSDK/BNCLog .h>
12+ #import < BranchSDK/BranchLogger .h>
1313#import < BranchSDK/BranchPluginSupport.h>
1414#import < BranchSDK/BranchEvent.h>
1515
@@ -70,9 +70,8 @@ - (nullable instancetype)initWithRuntime:(id<AEPExtensionRuntime> _Nonnull)runti
7070}
7171
7272- (void )onRegistered {
73- BNCLogDebug ( @" AdobeBranchExtension listener registered" ) ;
73+ [[BranchLogger shared ] logDebug: @" AdobeBranchExtension listener registered" ] ;
7474
75- BNCLogSetDisplayLevel (BNCLogLevelAll);
7675 [self deviceDataSharedState: NULL ];
7776
7877 [runtime_ registerListenerWithType: AEPEventType.wildcard source: AEPEventSource.wildcard listener: ^(AEPEvent * _Nonnull event) {
@@ -139,7 +138,7 @@ + (BOOL)configureEventExclusionList:(nullable NSArray<NSString *> *)eventNames e
139138 // If already configured allowList
140139 if ([AdobeBranchExtensionConfig instance ].allowList .count != 0 ) {
141140 *configError = [NSError errorWithDomain: AdobeBranchExtensionErrorDomain code: ABEBranchConflictConfiguration userInfo: @{NSLocalizedFailureReasonErrorKey : @" Already configured allowList for AdobeBranchExtensionConfig" }];
142- BNCLogError ([ NSString stringWithFormat: @" AdobeBranchExtensionConfig error: %@ ." , *configError]) ;
141+ [[BranchLogger shared ] logWarning: [ NSString stringWithFormat: @" AdobeBranchExtensionConfig error: %@ ." , *configError]] ;
143142 return NO ;
144143 } else {
145144 [AdobeBranchExtensionConfig instance ].exclusionList = eventNames;
@@ -153,7 +152,7 @@ + (BOOL)configureEventAllowList:(nullable NSArray<NSString *> *)eventNames error
153152 // If already configured allowList
154153 if ([AdobeBranchExtensionConfig instance ].exclusionList .count != 0 ) {
155154 *configError = [NSError errorWithDomain: AdobeBranchExtensionErrorDomain code: ABEBranchConflictConfiguration userInfo: @{NSLocalizedFailureReasonErrorKey : @" Already configured exclusionList for AdobeBranchExtensionConfig" }];
156- BNCLogError ([ NSString stringWithFormat: @" AdobeBranchExtensionConfig error: %@ ." , *configError]) ;
155+ [[BranchLogger shared ] logWarning: [ NSString stringWithFormat: @" AdobeBranchExtensionConfig error: %@ ." , *configError]] ;
157156 return NO ;
158157 } else {
159158 [AdobeBranchExtensionConfig instance ].allowList = eventNames;
@@ -165,7 +164,7 @@ + (BOOL)configureEventAllowList:(nullable NSArray<NSString *> *)eventNames error
165164#pragma mark - Action Events
166165
167166- (void )handleEvent : (AEPEvent*)event {
168- BNCLogDebug ([ NSString stringWithFormat: @" Handling Event: %@ " , event]) ;
167+ [[BranchLogger shared ] logDebug: [ NSString stringWithFormat: @" Handling Event: %@ " , event]] ;
169168
170169 if ([[AdobeBranchExtensionConfig instance ].eventTypes containsObject: event.type] &&
171170 [[AdobeBranchExtensionConfig instance ].eventSources containsObject: event.source]) {
@@ -334,11 +333,11 @@ - (void) passAdobeIdsToBranch:(AEPEvent*)eventToProcess {
334333 AEPSharedStateResult *configSharedState = [self .runtime getSharedStateWithExtensionName: eventToProcess.data[ABEAdobeEventDataKey_StateOwner] event: eventToProcess barrier: NO ];
335334
336335 if (!configSharedState.value ) {
337- BNCLogDebug ( @" BranchSDK_ Could not process event, configuration shared state is pending" ) ;
336+ [[BranchLogger shared ] logWarning: @" BranchSDK_ Could not process event, configuration shared state is pending" ] ;
338337 return ;
339338 }
340339 if (error) {
341- BNCLogDebug ( @" BranchSDK_ Could not process event, an error occured while retrieving configuration shared state" ) ;
340+ [[BranchLogger shared ] logWarning: @" BranchSDK_ Could not process event, an error occured while retrieving configuration shared state" ] ;
342341 return ;
343342 }
344343
0 commit comments