aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Xiangtian Dai <xiangtian@google.com>2017-06-29 11:57:52 -0700
committerGravatar GitHub <noreply@github.com>2017-06-29 11:57:52 -0700
commitacb7a32afa4ef10915fd33005ac5e5830cf7dd6c (patch)
tree11b108db36c43fe9776c4b93cd86b4c8f717dae3
parent986199d5a300ff303a1af9ae1439bcf53f2cfff6 (diff)
Changes client-side logging level for some messages generated by Auth to be in line with product-wise standard. (#109)
-rw-r--r--Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m6
-rw-r--r--Firebase/Auth/Source/FIRAuth.m12
-rw-r--r--Firebase/Auth/Source/FIRAuthAPNSTokenManager.m28
-rw-r--r--Firebase/Auth/Source/FIRAuthNotificationManager.m6
4 files changed, 26 insertions, 26 deletions
diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
index 423b2b6..823403c 100644
--- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
+++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
@@ -198,9 +198,9 @@ typedef void (^FIRVerifyClientCallback)(FIRAuthAppCredential *_Nullable appCrede
timeout:timeout
callback:^(FIRAuthAppCredential *credential) {
if (!credential.secret) {
- FIRLogError(kFIRLoggerAuth, @"I-AUT000014",
- @"Failed to receive remote notification to verify app identity within "
- @"%.0f second(s)", timeout);
+ FIRLogWarning(kFIRLoggerAuth, @"I-AUT000014",
+ @"Failed to receive remote notification to verify app identity within "
+ @"%.0f second(s)", timeout);
}
completion(credential, nil);
}];
diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m
index eb5fed5..4297642 100644
--- a/Firebase/Auth/Source/FIRAuth.m
+++ b/Firebase/Auth/Source/FIRAuth.m
@@ -1035,10 +1035,10 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
return;
}
if (retry) {
- FIRLogNotice(kFIRLoggerAuth, @"I-AUT000003",
- @"Token auto-refresh re-scheduled in %02d:%02d "
- @"because of error on previous refresh attempt.",
- (int)ceil(delay) / 60, (int)ceil(delay) % 60);
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000003",
+ @"Token auto-refresh re-scheduled in %02d:%02d "
+ @"because of error on previous refresh attempt.",
+ (int)ceil(delay) / 60, (int)ceil(delay) % 60);
} else {
FIRLogInfo(kFIRLoggerAuth, @"I-AUT000004",
@"Token auto-refresh scheduled in %02d:%02d for the new token.",
@@ -1070,8 +1070,8 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
}
// If the error is an invalid token, sign the user out.
if (error.code == FIRAuthErrorCodeInvalidUserToken) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000005",
- @"Invalid refresh token detected, user is automatically signed out.");
+ FIRLogNotice(kFIRLoggerAuth, @"I-AUT000005",
+ @"Invalid refresh token detected, user is automatically signed out.");
[strongSelf signOutByForceWithUserID:uid error:nil];
return;
}
diff --git a/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m b/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
index 9609d86..575bee9 100644
--- a/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
+++ b/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
@@ -132,8 +132,8 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
if ([envClass performSelector:isSimulatorSelector]) {
#pragma clang diagnostic pop
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000006",
- @"Assuming prod APNs token type on simulator.");
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000006",
+ @"Assuming prod APNs token type on simulator.");
return defaultAppTypeProd;
}
}
@@ -166,8 +166,8 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
NSMutableData *profileData = [NSMutableData dataWithContentsOfFile:path options:0 error:&error];
if (!profileData.length || error) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000007",
- @"Error while reading embedded mobileprovision %@", error);
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000007",
+ @"Error while reading embedded mobileprovision %@", error);
return defaultAppTypeProd;
}
@@ -188,8 +188,8 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
freeWhenDone:NO];
if (error || !embeddedProfile.length) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000008",
- @"Error while reading embedded mobileprovision %@", error);
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000008",
+ @"Error while reading embedded mobileprovision %@", error);
return defaultAppTypeProd;
}
@@ -207,8 +207,8 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
NSData *data = [plistContents dataUsingEncoding:NSUTF8StringEncoding];
if (!data.length) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000009",
- @"Couldn't read plist fetched from embedded mobileprovision");
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000009",
+ @"Couldn't read plist fetched from embedded mobileprovision");
return defaultAppTypeProd;
}
@@ -218,9 +218,9 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
format:nil
error:&plistMapError];
if (plistMapError || ![plistData isKindOfClass:[NSDictionary class]]) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000010",
- @"Error while converting assumed plist to dict %@",
- plistMapError.localizedDescription);
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000010",
+ @"Error while converting assumed plist to dict %@",
+ plistMapError.localizedDescription);
return defaultAppTypeProd;
}
NSDictionary *plistMap = (NSDictionary *)plistData;
@@ -237,9 +237,9 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
// No aps-environment in the profile.
if (!apsEnvironment.length) {
- FIRLogWarning(kFIRLoggerAuth, @"I-AUT000013",
- @"No aps-environment set. If testing on a device APNS is not "
- @"correctly configured. Please recheck your provisioning profiles.");
+ FIRLogInfo(kFIRLoggerAuth, @"I-AUT000013",
+ @"No aps-environment set. If testing on a device APNS is not "
+ @"correctly configured. Please recheck your provisioning profiles.");
return defaultAppTypeProd;
}
diff --git a/Firebase/Auth/Source/FIRAuthNotificationManager.m b/Firebase/Auth/Source/FIRAuthNotificationManager.m
index 976114b..c8c52e9 100644
--- a/Firebase/Auth/Source/FIRAuthNotificationManager.m
+++ b/Firebase/Auth/Source/FIRAuthNotificationManager.m
@@ -114,9 +114,9 @@ static const NSTimeInterval kProbingTimeout = 1;
[_application.delegate application:_application
didReceiveRemoteNotification:proberNotification];
} else {
- FIRLogError(kFIRLoggerAuth, @"I-AUT000015",
- @"The UIApplicationDelegate must handle remote notification for phone number "
- @"authentication to work.");
+ FIRLogWarning(kFIRLoggerAuth, @"I-AUT000015",
+ @"The UIApplicationDelegate must handle remote notification for phone number "
+ @"authentication to work.");
}
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(_timeout * NSEC_PER_SEC)),