Skip to content

Commit

Permalink
Remove usage of NSLog in ARTPublicEventEmitter
Browse files Browse the repository at this point in the history
Replace it with a call to an ARTLog instance.

The test change is because the first recorded log message will now be a
"PublicEventEmitter Notification emitted" message instead of the
previous "channel state transitions" one.
  • Loading branch information
lawrence-forooghian committed Dec 7, 2022
1 parent ce62489 commit b2e024c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/ARTEventEmitter.m
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ - (instancetype)initWithRest:(ARTRestInternal *)rest {
object:nil
queue:nil
usingBlock:^(NSNotification *notification) {
NSLog(@"VERBOSE: PublicEventEmitter Notification emitted %@", notification.name);
[rest.logger verbose:@"PublicEventEmitter Notification emitted %@", notification.name];
}];
}
}
Expand Down
2 changes: 1 addition & 1 deletion Spec/Tests/UtilitiesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class UtilitiesTests: XCTestCase {
}

expect(realtime.internal.logger.history.count).toNot(beGreaterThan(100))
expect(realtime.internal.logger.history.map { $0.message }.first).to(contain("channel state transitions from 1 - Attaching to 2 - Attached"))
expect(realtime.internal.logger.history.filter { $0.message.contains("channel state transitions from 1 - Attaching to 2 - Attached") }).to(haveCount(1))
expect(realtime.internal.logger.history.filter { $0.message.contains("realtime state transitions to 2 - Connected") }).to(haveCount(1))
}

Expand Down

0 comments on commit b2e024c

Please sign in to comment.