Apply OWS log functions in Objective-C.

This commit is contained in:
Matthew Chen 2018-08-27 12:09:39 -04:00
parent 3a50377902
commit c0d486b1f1
32 changed files with 95 additions and 95 deletions

View File

@ -357,7 +357,7 @@ static NSTimeInterval launchStartedAt;
- (nullable NSError *)convertDatabaseIfNecessary
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
NSString *databaseFilePath = [OWSPrimaryStorage legacyDatabaseFilePath];
if (![[NSFileManager defaultManager] fileExistsAtPath:databaseFilePath]) {
@ -432,7 +432,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -445,7 +445,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -466,7 +466,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -482,7 +482,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return NO;
}
@ -523,7 +523,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -661,7 +661,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -686,7 +686,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -735,7 +735,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return NO;
}
@ -879,7 +879,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -893,7 +893,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -907,11 +907,11 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
OWSLogInfo(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, notification);
OWSLogInfo(@"%@", notification);
[AppReadiness runNowOrWhenAppIsReady:^{
[[PushManager sharedManager] application:application didReceiveLocalNotification:notification];
}];
@ -925,7 +925,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}
@ -954,7 +954,7 @@ static NSTimeInterval launchStartedAt;
OWSAssertIsOnMainThread();
if (self.didAppLaunchFail) {
OWSFailDebug(@"%@ %s app launch failed", self.logTag, __PRETTY_FUNCTION__);
OWSFailDebug(@"app launch failed");
return;
}

View File

@ -220,7 +220,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
NSArray *notifications = [self.dbConnection beginLongLivedReadTransaction];
[self setupEditButton];

View File

@ -283,7 +283,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)show2FASettings
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
OWS2FASettingsViewController *vc = [OWS2FASettingsViewController new];
vc.mode = OWS2FASettingsMode_Status;
@ -306,14 +306,14 @@ NS_ASSUME_NONNULL_BEGIN
- (void)screenLockDidChange:(NSNotification *)notification
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[self updateTableContents];
}
- (void)showScreenLockTimeoutUI
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
UIAlertController *controller = [UIAlertController
alertControllerWithTitle:NSLocalizedString(@"SETTINGS_SCREEN_LOCK_ACTIVITY_TIMEOUT",

View File

@ -2518,7 +2518,7 @@ typedef enum : NSUInteger {
- (void)didFinishEditingContact
{
OWSLogDebug(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogDebug(@"");
[self dismissViewControllerAnimated:NO completion:nil];
}
@ -3208,7 +3208,7 @@ typedef enum : NSUInteger {
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (self.shouldObserveDBModifications) {
// External database modifications can't be converted into incremental updates,
@ -3243,7 +3243,7 @@ typedef enum : NSUInteger {
return;
}
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
NSArray *notifications = notification.userInfo[OWSUIDatabaseConnectionNotificationsKey];
OWSAssert([notifications isKindOfClass:[NSArray class]]);
@ -4079,7 +4079,7 @@ typedef enum : NSUInteger {
- (void)didPasteAttachment:(SignalAttachment *_Nullable)attachment
{
OWSLogError(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogError(@"");
[self tryToSendAttachmentIfApproved:attachment];
}
@ -4092,7 +4092,7 @@ typedef enum : NSUInteger {
- (void)tryToSendAttachmentIfApproved:(SignalAttachment *_Nullable)attachment
skipApprovalDialog:(BOOL)skipApprovalDialog
{
OWSLogError(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogError(@"");
DispatchMainThreadSafe(^{
__weak ConversationViewController *weakSelf = self;
@ -4138,7 +4138,7 @@ typedef enum : NSUInteger {
// `willChange` is the correct keyboard notifiation to observe when adjusting contentInset
// in lockstep with the keyboard presentation animation. `didChange` results in the contentInset
// not adjusting until after the keyboard is fully up.
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self handleKeyboardNotification:notification];
}
@ -4260,7 +4260,7 @@ typedef enum : NSUInteger {
NSString *errorMessage
= (attachment ? [attachment localizedErrorDescription] : [SignalAttachment missingDataErrorMessage]);
OWSLogError(@"%@ %s: %@", self.logTag, __PRETTY_FUNCTION__, errorMessage);
OWSLogError(@": %@", errorMessage);
[OWSAlerts showAlertWithTitle:NSLocalizedString(
@"ATTACHMENT_ERROR_ALERT_TITLE", @"The title of the 'attachment error' alert.")

View File

@ -541,7 +541,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
NewContactThreadViewController *viewController = [NewContactThreadViewController new];
@ -1263,7 +1263,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (self.shouldObserveDBModifications) {
// External database modifications can't be converted into incremental updates,
@ -1284,7 +1284,7 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
return;
}
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
NSArray *notifications = [self.uiDatabaseConnection beginLongLivedReadTransaction];

View File

@ -455,7 +455,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(self.isVideo);
OWSAssert(self.videoPlayer);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self stopVideo];
}

View File

@ -116,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(self.verificationCode.length > 0);
OWSAssert(pinCode.length > 0);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
__weak OWS2FARegistrationViewController *weakSelf = self;

View File

@ -338,7 +338,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(![OWS2FAManager.sharedManager is2FAEnabled]);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
OWS2FASettingsViewController *vc = [OWS2FASettingsViewController new];
vc.mode = OWS2FASettingsMode_SelectPIN;
@ -348,7 +348,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)tryToDisable2FA
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
__weak OWS2FASettingsViewController *weakSelf = self;
@ -380,7 +380,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(self.candidatePin.length > 0);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
__weak OWS2FASettingsViewController *weakSelf = self;
@ -417,7 +417,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert([OWS2FAManager.sharedManager is2FAEnabled]);
OWSAssert(self.root2FAViewController);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[self.navigationController popToViewController:self.root2FAViewController animated:YES];
}
@ -429,7 +429,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)stateDidChange:(NSNotification *)notification
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
if (self.mode == OWS2FASettingsMode_Status) {
[self createContents];

View File

@ -78,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)didFinishEditingContact
{
OWSLogDebug(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogDebug(@"");
[self dismissViewControllerAnimated:NO
completion:^{
[self.navigationController popViewControllerAnimated:YES];

View File

@ -196,7 +196,7 @@ const CGFloat kIconViewLength = 24;
{
[self updateTableContents];
OWSLogDebug(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogDebug(@"");
[self dismissViewControllerAnimated:NO completion:nil];
}

View File

@ -438,7 +438,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)didFinishEditingContact
{
OWSLogDebug(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogDebug(@"");
[self dismissViewControllerAnimated:YES completion:nil];
}

View File

@ -199,7 +199,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
if (!thread) {
OWSFailDebug(@"%@ Can't present nil thread.", self.logTag);
@ -231,7 +231,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)resetAppData
{
// This _should_ be wiped out below.
OWSLogError(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogError(@"");
[DDLog flushLog];
[OWSStorage resetAllStorage];

View File

@ -80,7 +80,7 @@ NS_ASSUME_NONNULL_BEGIN
self.reportedApplicationState = UIApplicationStateInactive;
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationWillEnterForegroundNotification object:nil];
}
@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN
self.reportedApplicationState = UIApplicationStateBackground;
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[DDLog flushLog];
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationDidEnterBackgroundNotification object:nil];
@ -103,7 +103,7 @@ NS_ASSUME_NONNULL_BEGIN
self.reportedApplicationState = UIApplicationStateInactive;
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[DDLog flushLog];
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationWillResignActiveNotification object:nil];
@ -115,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN
self.reportedApplicationState = UIApplicationStateActive;
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationDidBecomeActiveNotification object:nil];
@ -126,7 +126,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[DDLog flushLog];
}

View File

@ -295,7 +295,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[OWSBackupAPI checkForManifestInCloudWithSuccess:^(BOOL value) {
dispatch_async(dispatch_get_main_queue(), ^{
@ -368,7 +368,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s.", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@".");
if (self.backupImportJob == backupJob) {
self.backupImportJob = nil;
@ -392,7 +392,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s: %@", self.logTag, __PRETTY_FUNCTION__, error);
OWSLogInfo(@": %@", error);
if (self.backupImportJob == backupJob) {
self.backupImportJob = nil;
@ -418,7 +418,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
// TODO: Should we consolidate this state?
BOOL didChange;
@ -447,7 +447,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[OWSBackupAPI
fetchAllRecordNamesWithSuccess:^(NSArray<NSString *> *recordNames) {
@ -465,7 +465,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[OWSBackupAPI
fetchAllRecordNamesWithSuccess:^(NSArray<NSString *> *recordNames) {

View File

@ -314,7 +314,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
self.backgroundTask = [OWSBackgroundTask backgroundTaskWithLabelStr:__PRETTY_FUNCTION__];
@ -396,7 +396,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (![self ensureJobTempDir]) {
OWSFailDebug(@"%@ Could not create jobTempDirPath.", self.logTag);
@ -436,7 +436,7 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
__weak OWSBackupExportJob *weakSelf = self;
[OWSBackupAPI fetchAllRecordNamesWithSuccess:^(NSArray<NSString *> *recordNames) {
@ -463,7 +463,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(self.backupIO);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self updateProgressWithDescription:NSLocalizedString(@"BACKUP_EXPORT_PHASE_DATABASE_EXPORT",
@"Indicates that the database data is being exported.")
@ -620,7 +620,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
self.savedDatabaseItems = [NSMutableArray new];
self.savedAttachmentItems = [NSMutableArray new];
@ -954,7 +954,7 @@ NS_ASSUME_NONNULL_BEGIN
return completion(nil);
}
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self updateProgressWithDescription:NSLocalizedString(@"BACKUP_EXPORT_PHASE_CLEAN_UP",
@"Indicates that the cloud is being cleaned up.")
@ -1057,7 +1057,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(obsoleteRecordNames);
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (obsoleteRecordNames.count < 1) {
// No more records to delete; cleanup is complete.

View File

@ -39,7 +39,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
self.backgroundTask = [OWSBackgroundTask backgroundTaskWithLabelStr:__PRETTY_FUNCTION__];
@ -172,7 +172,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
- (BOOL)configureImport
{
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (![self ensureJobTempDir]) {
OWSFailDebug(@"%@ Could not create jobTempDirPath.", self.logTag);
@ -190,7 +190,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
OWSAssert(items.count > 0);
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self downloadNextItemFromCloud:items recordCount:items.count completion:completion];
}
@ -256,7 +256,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
- (void)restoreAttachmentFiles
{
OWSLogVerbose(@"%@ %s: %zd", self.logTag, __PRETTY_FUNCTION__, self.attachmentsItems.count);
OWSLogVerbose(@": %zd", self.attachmentsItems.count);
__block NSUInteger count = 0;
YapDatabaseConnection *dbConnection = self.primaryStorage.newDatabaseConnection;
@ -302,7 +302,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
{
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (self.isComplete) {
return completion(NO);
@ -460,7 +460,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
{
OWSAssert(completion);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self updateProgressWithDescription:NSLocalizedString(@"BACKUP_IMPORT_PHASE_FINALIZING",
@"Indicates that the backup import data is being finalized.")

View File

@ -75,7 +75,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
- (BOOL)ensureJobTempDir
{
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
// TODO: Exports should use a new directory each time, but imports
// might want to use a predictable directory so that repeated
@ -101,7 +101,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
- (void)succeed
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
dispatch_async(dispatch_get_main_queue(), ^{
if (self.isComplete) {
@ -126,7 +126,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
- (void)failWithError:(NSError *)error
{
OWSFailDebug(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, error);
OWSFailDebug(@"%@", error);
dispatch_async(dispatch_get_main_queue(), ^{
OWSAssert(!self.hasSucceeded);
@ -140,7 +140,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
- (void)updateProgressWithDescription:(nullable NSString *)description progress:(nullable NSNumber *)progress
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
dispatch_async(dispatch_get_main_queue(), ^{
if (self.isComplete) {
@ -160,7 +160,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
OWSAssert(failure);
OWSAssert(backupIO);
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
__weak OWSBackupJob *weakSelf = self;
[OWSBackupAPI downloadManifestFromCloudWithSuccess:^(NSData *data) {
@ -198,7 +198,7 @@ NSString *const kOWSBackup_KeychainService = @"kOWSBackup_KeychainService";
return;
}
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
NSData *_Nullable manifestDataDecrypted =
[backupIO decryptDataAsData:manifestDataEncrypted encryptionKey:self.delegate.backupEncryptionKey];

View File

@ -206,7 +206,7 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self failWithError:error];
}
@ -215,7 +215,7 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
{
OWSAssert(error);
OWSLogError(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, error);
OWSLogError(@"%@", error);
DispatchMainThreadSafe(^{
// Call the completions exactly once.
@ -231,7 +231,7 @@ typedef void (^DebugLogUploadFailure)(DebugLogUploader *uploader, NSError *error
{
OWSAssert(url);
OWSLogVerbose(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, url);
OWSLogVerbose(@"%@", url);
DispatchMainThreadSafe(^{
// Call the completions exactly once.

View File

@ -118,7 +118,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self.uiDatabaseConnection beginLongLivedReadTransaction];
[self updateTableContents];

View File

@ -132,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
if (self.shouldObserveDBModifications) {
// External database modifications can't be converted into incremental updates,
@ -155,7 +155,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
NSArray *notifications = [self.uiDatabaseConnection beginLongLivedReadTransaction];

View File

@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)performUpdateCheckWithCompletion:(VersionMigrationCompletion)completion
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
// performUpdateCheck must be invoked after Environment has been initialized because
// upgrade process may depend on Environment.

View File

@ -405,7 +405,7 @@ NSString *const kLocalProfileUniqueId = @"kLocalProfileUniqueId";
+ (nullable NSError *)migrateToSharedData
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
return [OWSFileSystem moveAppFilePath:self.legacyProfileAvatarsDirPath
sharedDataFilePath:self.sharedDataProfileAvatarsDirPath];

View File

@ -702,7 +702,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)deleteAllContent
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[OWSPrimaryStorage.sharedManager.newDatabaseConnection
readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {

View File

@ -511,7 +511,7 @@ NSString *const TSAccountManager_ServerSignalingKey = @"TSStorageServerSignaling
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
// Any database write by the main app might reflect a deregistration,
// so clear the cached "is registered" state. This will significantly

View File

@ -258,7 +258,7 @@ static const NSUInteger kMaxPrekeyUpdateFailureCount = 5;
NSNumber *currentSignedPrekeyId = [primaryStorage currentSignedPrekeyId];
BOOL shouldUpdateSignedPrekey = NO;
if (!currentSignedPrekeyId) {
OWSLogError(@"%@ %s Couldn't find current signed prekey id", self.logTag, __PRETTY_FUNCTION__);
OWSLogError(@"Couldn't find current signed prekey id");
shouldUpdateSignedPrekey = YES;
} else {
SignedPreKeyRecord *currentRecord =
@ -355,7 +355,7 @@ static const NSUInteger kMaxPrekeyUpdateFailureCount = 5;
OWSPrimaryStorage *primaryStorage = [OWSPrimaryStorage sharedManager];
SignedPreKeyRecord *currentRecord = [primaryStorage loadSignedPrekeyOrNil:keyId.intValue];
if (!currentRecord) {
OWSFailDebug(@"%@ %s Couldn't find signed prekey for id: %@", self.logTag, __PRETTY_FUNCTION__, keyId);
OWSFailDebug(@"Couldn't find signed prekey for id: %@", keyId);
}
NSArray *allSignedPrekeys = [primaryStorage loadSignedPreKeys];
NSArray *oldSignedPrekeys

View File

@ -209,7 +209,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (nullable NSError *)migrateToSharedData
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
return [OWSFileSystem moveAppFilePath:self.legacyAttachmentsDirPath
sharedDataFilePath:self.sharedDataAttachmentsDirPath];

View File

@ -125,7 +125,7 @@ NSString *const kNSNotification_SocketManagerStateDidChange = @"kNSNotification_
self.hasCompleted = YES;
}
OWSLogError(@"%@ %s didFailWithStatusCode: %zd, %@", self.logTag, __PRETTY_FUNCTION__, statusCode, error);
OWSLogError(@"didFailWithStatusCode: %zd, %@", statusCode, error);
OWSAssert(self.success);
OWSAssert(self.failure);

View File

@ -126,7 +126,7 @@ void VerifyRegistrationsForPrimaryStorage(OWSStorage *storage)
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogVerbose(@"");
[self updateUIDatabaseConnectionToLatest];
}
@ -305,7 +305,7 @@ void VerifyRegistrationsForPrimaryStorage(OWSStorage *storage)
+ (nullable NSError *)migrateToSharedData
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
// Given how sensitive this migration is, we verbosely
// log the contents of all involved paths before and after.

View File

@ -401,7 +401,7 @@ NSString *const kNSUserDefaults_DatabaseExtensionVersionMap = @"kNSUserDefaults_
{
OWSAssert(self.isStorageReady);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
@ -513,7 +513,7 @@ NSString *const kNSUserDefaults_DatabaseExtensionVersionMap = @"kNSUserDefaults_
+ (void)incrementVersionOfDatabaseExtension:(NSString *)extensionName
{
OWSLogError(@"%@ %s %@", self.logTag, __PRETTY_FUNCTION__, extensionName);
OWSLogError(@"%@", extensionName);
NSUserDefaults *appUserDefaults = [NSUserDefaults appUserDefaults];
OWSAssert(appUserDefaults);

View File

@ -79,7 +79,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssertIsOnMainThread();
OWSAssert(!self.isAppReady);
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
self.isAppReady = YES;

View File

@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)migrateToSharedUserDefaults
{
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
NSUserDefaults *appUserDefaults = self.appUserDefaults;

View File

@ -70,7 +70,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
self.reportedApplicationState = UIApplicationStateActive;
@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
self.reportedApplicationState = UIApplicationStateInactive;
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[DDLog flushLog];
[NSNotificationCenter.defaultCenter postNotificationName:OWSApplicationWillResignActiveNotification object:nil];
@ -93,7 +93,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
[DDLog flushLog];
self.reportedApplicationState = UIApplicationStateBackground;
@ -105,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
{
OWSAssertIsOnMainThread();
OWSLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
OWSLogInfo(@"");
self.reportedApplicationState = UIApplicationStateInactive;