aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Remote/FSTOnlineStateTracker.mm
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-05-23 07:00:05 -0700
committerGravatar GitHub <noreply@github.com>2018-05-23 07:00:05 -0700
commitaf19a1b07245b7d0be4fd492bd3731964937c7c6 (patch)
treee19db1c38a0de792ef8f49b259f34d0dab252fb1 /Firestore/Source/Remote/FSTOnlineStateTracker.mm
parent23f8320148672310ff71aa3ef2b6c3ac86d47ede (diff)
Reimplement C++ logging (#1313)
* Add direct support for formatting Objective-C objects * Rewrite log.h * Convert FSTWarn to LOG_WARN * Convert FSTLog to LOG_DEBUG * Remove FSTLogger
Diffstat (limited to 'Firestore/Source/Remote/FSTOnlineStateTracker.mm')
-rw-r--r--Firestore/Source/Remote/FSTOnlineStateTracker.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Firestore/Source/Remote/FSTOnlineStateTracker.mm b/Firestore/Source/Remote/FSTOnlineStateTracker.mm
index e782397..e512a3c 100644
--- a/Firestore/Source/Remote/FSTOnlineStateTracker.mm
+++ b/Firestore/Source/Remote/FSTOnlineStateTracker.mm
@@ -18,7 +18,8 @@
#import "Firestore/Source/Remote/FSTRemoteStore.h"
#import "Firestore/Source/Util/FSTAssert.h"
#import "Firestore/Source/Util/FSTDispatchQueue.h"
-#import "Firestore/Source/Util/FSTLogger.h"
+
+#include "Firestore/core/src/firebase/firestore/util/log.h"
NS_ASSUME_NONNULL_BEGIN
@@ -83,10 +84,9 @@ static const NSTimeInterval kOnlineStateTimeout = 10;
FSTAssert(
self.state == FSTOnlineStateUnknown,
@"Timer should be canceled if we transitioned to a different state.");
- FSTLog(
- @"Watch stream didn't reach Online or Offline within %f seconds. "
- @"Considering "
- "client offline.",
+ LOG_DEBUG(
+ "Watch stream didn't reach Online or Offline within %s seconds. "
+ "Considering client offline.",
kOnlineStateTimeout);
[self logClientOfflineWarningIfNecessary];
[self setAndBroadcastState:FSTOnlineStateOffline];
@@ -138,7 +138,7 @@ static const NSTimeInterval kOnlineStateTimeout = 10;
- (void)logClientOfflineWarningIfNecessary {
if (self.shouldWarnClientIsOffline) {
- FSTWarn(@"Could not reach Firestore backend.");
+ LOG_WARN("Could not reach Firestore backend.");
self.shouldWarnClientIsOffline = NO;
}
}