TF-4136 refactor(logging): replace logError with logWarning for non-critical cases
This commit is contained in:
@@ -20,7 +20,7 @@ class AppUtils {
|
||||
try {
|
||||
await loadFcmConfigFileToEnv(currentMapEnvData: mapEnvData);
|
||||
} catch (e) {
|
||||
logError('AppUtils::loadEnvFile:loadFcmConfigFileToEnv: Exception = $e');
|
||||
logWarning('AppUtils::loadEnvFile:loadFcmConfigFileToEnv: Exception = $e');
|
||||
await dotenv.load(fileName: AppConfig.envFileName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class AssetPreloader {
|
||||
HtmlEditorUtils.loadAsset(HtmlEditorConstants.summernoteFontTTFAssetPath),
|
||||
]);
|
||||
} catch (e) {
|
||||
logError('AssetPreloader::preloadHtmlEditorAssets:Exception = $e');
|
||||
logWarning('AssetPreloader::preloadHtmlEditorAssets:Exception = $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class CozyIntegration {
|
||||
await cozyConfig.injectCozyScript(AppConfig.cozyExternalBridgeVersion);
|
||||
await cozyConfig.initialize();
|
||||
} catch (e) {
|
||||
logError('CozyIntegration::integrateCozy:Exception = $e');
|
||||
logWarning('CozyIntegration::integrateCozy:Exception = $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class IOSNotificationManager {
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
logError('IOSNotificationManager::listenClickNotification:Exception = $e');
|
||||
logWarning('IOSNotificationManager::listenClickNotification:Exception = $e');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class IOSNotificationManager {
|
||||
return null;
|
||||
}
|
||||
} catch (e) {
|
||||
logError('IOSNotificationManager::getCurrentEmailIdInNotificationClick:Exception = $e');
|
||||
logWarning('IOSNotificationManager::getCurrentEmailIdInNotificationClick:Exception = $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class IOSSharingManager {
|
||||
final keychainSharingStored = await getKeychainSharingSession(accountId);
|
||||
return keychainSharingStored?.emailDeliveryState;
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getEmailDeliveryStateFromKeychain: Exception: $e');
|
||||
logWarning('IOSSharingManager::getEmailDeliveryStateFromKeychain: Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -59,8 +59,8 @@ class IOSSharingManager {
|
||||
log('IOSSharingManager::saveKeyChainSharingSession: START');
|
||||
try {
|
||||
if (!_validateToSaveKeychain(personalAccount)) {
|
||||
logError('IOSSharingManager::saveKeyChainSharingSession: AccountId | Username | ApiUrl is NULL');
|
||||
return Future.value(null);
|
||||
logWarning('IOSSharingManager::saveKeyChainSharingSession: AccountId | Username | ApiUrl is NULL');
|
||||
return;
|
||||
}
|
||||
|
||||
TokenOIDC? tokenOIDC;
|
||||
@@ -107,7 +107,7 @@ class IOSSharingManager {
|
||||
|
||||
log('IOSSharingManager::_saveKeyChainSharingSession: COMPLETED');
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_saveKeyChainSharingSession: Exception: $e');
|
||||
logWarning('IOSSharingManager::_saveKeyChainSharingSession: Exception: $e');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ class IOSSharingManager {
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::getKeychainSharingSession: Exception: $e');
|
||||
logWarning('IOSSharingManager::getKeychainSharingSession: Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class IOSSharingManager {
|
||||
try {
|
||||
return await _tokenOidcCacheManager.getTokenOidc(tokeHashId);
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getTokenOidc:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getTokenOidc:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class IOSSharingManager {
|
||||
final credentialInfo = await _authenticationInfoCacheManager.getAuthenticationInfoStored();
|
||||
return base64Encode(utf8.encode('${credentialInfo.username}:${credentialInfo.password}'));
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getCredentialAuthentication:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getCredentialAuthentication:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class IOSSharingManager {
|
||||
try {
|
||||
return await getEmailDeliveryStateFromKeychain(accountId);
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getEmailDeliveryState:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getEmailDeliveryState:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ class IOSSharingManager {
|
||||
log('IOSSharingManager::_getEmailState:emailState: $emailState');
|
||||
return emailState?.value;
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getEmailState:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getEmailState:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class IOSSharingManager {
|
||||
isTWP: oidcConfig.isTWP,
|
||||
);
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getTokenEndpointAndScopes:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getTokenEndpointScopesAndIsTWP:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ class IOSSharingManager {
|
||||
final keychainSharingStored = await getKeychainSharingSession(accountId);
|
||||
return keychainSharingStored?.mailboxIdsBlockNotification?.isNotEmpty == true;
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::getMailboxIdsBlockNotificationInKeyChain:Exception = $e');
|
||||
logWarning('IOSSharingManager::isExistMailboxIdsBlockNotificationInKeyChain:Exception = $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -219,7 +219,7 @@ class IOSSharingManager {
|
||||
final newKeychain = keychainSharingStored.updating(mailboxIdsBlockNotification: mailboxIds);
|
||||
await _keychainSharingManager.save(newKeychain);
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::updateMailboxIdsBlockNotificationInKeyChain: Exception = $e');
|
||||
logWarning('IOSSharingManager::updateMailboxIdsBlockNotificationInKeyChain: Exception = $e');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ class IOSSharingManager {
|
||||
log('IOSSharingManager::_getMailboxIdsBlockNotification(): CACHE_MAILBOX_LIST = $listMailboxIdBlockNotification');
|
||||
return listMailboxIdBlockNotification;
|
||||
} catch (e) {
|
||||
logError('IOSSharingManager::_getMailboxIdsBlockNotification:Exception: $e');
|
||||
logWarning('IOSSharingManager::_getMailboxIdsBlockNotification:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class ToastManager {
|
||||
final context = currentContext;
|
||||
final overlayContext = currentOverlayContext;
|
||||
if (context == null || overlayContext == null) {
|
||||
logError('ToastManager::showMessageFailure: Context or OverlayContext is null');
|
||||
logWarning('ToastManager::showMessageFailure: Context or OverlayContext is null');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ class ToastManager {
|
||||
final context = currentContext;
|
||||
final overlayContext = currentOverlayContext;
|
||||
if (context == null || overlayContext == null) {
|
||||
logError('ToastManager::showMessageSuccess: Context or OverlayContext is null');
|
||||
logWarning('ToastManager::showMessageSuccess: Context or OverlayContext is null');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ class ToastManager {
|
||||
final context = currentContext;
|
||||
final overlayContext = currentOverlayContext;
|
||||
if (context == null || overlayContext == null) {
|
||||
logError('$runtimeType::showMessageSuccessWithAction: Context or OverlayContext is null');
|
||||
logWarning('$runtimeType::showMessageSuccessWithAction: Context or OverlayContext is null');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user