فهرست منبع

add [LOG] on NSLog

Marino Faggiana 7 سال پیش
والد
کامیت
5f531978e9

+ 1 - 1
PickerFileProvider/FileProvider.swift

@@ -94,7 +94,7 @@ class FileProvider: NSFileProviderExtension, CCNetworkingDelegate {
         // Called at some point after the file has changed; the provider may then trigger an upload
                 
         let fileSize = (try! FileManager.default.attributesOfItem(atPath: url.path)[FileAttributeKey.size] as! NSNumber).uint64Value
-        NSLog("Item changed at URL %@ %lu", url as NSURL, fileSize)
+        NSLog("[LOG] Item changed at URL %@ %lu", url as NSURL, fileSize)
 
         guard let account = NCManageDatabase.sharedInstance.getAccountActive() else {
             self.stopProvidingItem(at: url)

+ 1 - 1
iOSClient/AppDelegate.m

@@ -1410,7 +1410,7 @@
         return;
     
     // BACKGROND & FOREGROUND
-    NSLog(@"-PROCESS-AUTO-UPLOAD-");
+    NSLog(@"[LOG]  -PROCESS-AUTO-UPLOAD-");
     
     if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
         

+ 1 - 1
iOSClient/AutoUpload/NCAutoUpload.m

@@ -629,7 +629,7 @@
     [[NCManageDatabase sharedInstance] clearTable:[tablePhotoLibrary class] account:app.activeAccount];
     (void)[[NCManageDatabase sharedInstance] addPhotoLibrary:(NSArray *)assets];
 
-    NSLog(@"Align Photo Library %lu", (unsigned long)[assets count]);
+    NSLog(@"[LOG] Align Photo Library %lu", (unsigned long)[assets count]);
 }
 
 @end

+ 5 - 5
iOSClient/Main/CCMain.m

@@ -650,12 +650,12 @@
 
 - (void)documentMenuWasCancelled:(UIDocumentMenuViewController *)documentMenu
 {
-    NSLog(@"Cancelled");
+    NSLog(@"[LOG] Cancelled");
 }
 
 - (void)documentPickerWasCancelled:(UIDocumentPickerViewController *)controller
 {
-    NSLog(@"Cancelled");
+    NSLog(@"[LOG] Cancelled");
 }
 
 - (void)documentMenu:(UIDocumentMenuViewController *)documentMenu didPickDocumentPicker:(UIDocumentPickerViewController *)documentPicker
@@ -811,7 +811,7 @@
             }];
             
             UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"Cancel action");
+                NSLog(@"[LOG] Cancel action");
             }];
             
             UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
@@ -3920,7 +3920,7 @@
                                         }];
                                         
                                         UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                                            NSLog(@"Cancel action");
+                                            NSLog(@"[LOG] Cancel action");
                                         }];
                                         
                                         UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
@@ -4124,7 +4124,7 @@
                                     }];
                                     
                                     UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                                        NSLog(@"Cancel action");
+                                        NSLog(@"[LOG] Cancel action");
                                     }];
                                     
                                     UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

+ 3 - 3
iOSClient/Networking/CCNetworking.m

@@ -422,7 +422,7 @@
             
                 NSString *dateString = [fields objectForKey:@"Date"];
                 if (![dateFormatter getObjectValue:&date forString:dateString range:nil error:&error]) {
-                    NSLog(@"Date '%@' could not be parsed: %@", dateString, error);
+                    NSLog(@"[LOG] Date '%@' could not be parsed: %@", dateString, error);
                     date = [NSDate date];
                 }
             
@@ -467,7 +467,7 @@
                 NSString *dateString = [fields objectForKey:@"Date"];
                 if (dateString) {
                     if (![dateFormatter getObjectValue:&date forString:dateString range:nil error:&error]) {
-                        NSLog(@"Date '%@' could not be parsed: %@", dateString, error);
+                        NSLog(@"[LOG] Date '%@' could not be parsed: %@", dateString, error);
                         date = [NSDate date];
                     }
                 } else {
@@ -626,7 +626,7 @@
             
         [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"NotificationProgressTask" object:nil userInfo:userInfo];
     } else {
-        NSLog(@"metadata not found");
+        NSLog(@"[LOG] metadata not found");
     }
 }
 

+ 10 - 10
iOSClient/Security/NCEndToEndEncryption.m

@@ -176,7 +176,7 @@
     
     BIO_read(csrBIO, keyBytes, len);
     _csrData = [NSData dataWithBytes:keyBytes length:len];
-    NSLog(@"\n%@", [[NSString alloc] initWithData:_csrData encoding:NSUTF8StringEncoding]);
+    NSLog(@"[LOG] \n%@", [[NSString alloc] initWithData:_csrData encoding:NSUTF8StringEncoding]);
     
     // PublicKey
     BIO *publicKeyBIO = BIO_new(BIO_s_mem());
@@ -187,7 +187,7 @@
     
     BIO_read(publicKeyBIO, keyBytes, len);
     _publicKeyData = [NSData dataWithBytes:keyBytes length:len];
-    NSLog(@"\n%@", [[NSString alloc] initWithData:_publicKeyData encoding:NSUTF8StringEncoding]);
+    NSLog(@"[LOG] \n%@", [[NSString alloc] initWithData:_publicKeyData encoding:NSUTF8StringEncoding]);
     
     // PrivateKey
     BIO *privateKeyBIO = BIO_new(BIO_s_mem());
@@ -198,7 +198,7 @@
     
     BIO_read(privateKeyBIO, keyBytes, len);
     _privateKeyData = [NSData dataWithBytes:keyBytes length:len];
-    NSLog(@"\n%@", [[NSString alloc] initWithData:_privateKeyData encoding:NSUTF8StringEncoding]);
+    NSLog(@"[LOG] \n%@", [[NSString alloc] initWithData:_privateKeyData encoding:NSUTF8StringEncoding]);
     
     if(keyBytes)
         free(keyBytes);
@@ -253,7 +253,7 @@ cleanup:
         fclose(f);
         return NO;
     }
-    NSLog(@"Saved cert to %@", certificatePath);
+    NSLog(@"[LOG] Saved cert to %@", certificatePath);
     fclose(f);
     
     // PublicKey
@@ -264,7 +264,7 @@ cleanup:
         fclose(f);
         return NO;
     }
-    NSLog(@"Saved publicKey to %@", publicKeyPath);
+    NSLog(@"[LOG] Saved publicKey to %@", publicKeyPath);
     fclose(f);
     
     // Here you write the private key (pkey) to disk. OpenSSL will encrypt the
@@ -279,7 +279,7 @@ cleanup:
         fclose(f);
         return NO;
     }
-    NSLog(@"Saved privatekey to %@", privatekeyPath);
+    NSLog(@"[LOG] Saved privatekey to %@", privatekeyPath);
     fclose(f);
     
     // CSR Request sha256
@@ -291,7 +291,7 @@ cleanup:
         fclose(f);
         return NO;
     }
-    NSLog(@"Saved csr to %@", csrPath);
+    NSLog(@"[LOG] Saved csr to %@", csrPath);
     fclose(f);
     
     return YES;
@@ -310,7 +310,7 @@ cleanup:
         fclose(f);
         return NO;
     }
-    NSLog(@"Saved p12 to %@", path);
+    NSLog(@"[LOG] Saved p12 to %@", path);
     fclose(f);
     
     return YES;
@@ -453,7 +453,7 @@ cleanup:
     if(encrypted_length == -1) {
         char buffer[500];
         ERR_error_string(ERR_get_error(), buffer);
-        NSLog(@"%@",[NSString stringWithUTF8String:buffer]);
+        NSLog(@"[LOG]  %@",[NSString stringWithUTF8String:buffer]);
         return nil;
     }
     
@@ -483,7 +483,7 @@ cleanup:
     if(decrypted_length == -1) {
         char buffer[500];
         ERR_error_string(ERR_get_error(), buffer);
-        NSLog(@"%@",[NSString stringWithUTF8String:buffer]);
+        NSLog(@"[LOG] %@",[NSString stringWithUTF8String:buffer]);
         return nil;
     }
     

+ 1 - 1
iOSClient/Settings/NCManageEndToEndEncryption.m

@@ -344,7 +344,7 @@
         }];
         
         UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"Cancel action");
+            NSLog(@"[LOG] Cancel action");
         }];
         
         [alertController addAction:okAction];

+ 1 - 1
iOSClient/Utility/CCUtility.m

@@ -548,7 +548,7 @@
     [dateFormatter setDateFormat:@"EEE, dd MMM y HH:mm:ss zzz"];
 
     if (![dateFormatter getObjectValue:&date forString:dateString range:nil error:&error]) {
-        NSLog(@"Date '%@' could not be parsed: %@", dateString, error);
+        NSLog(@"[LOG] Date '%@' could not be parsed: %@", dateString, error);
         date = [NSDate date];
     }