Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarino Faggiana <marino@marinofaggiana.com>2022-10-01 12:43:30 +0300
committerMarino Faggiana <marino@marinofaggiana.com>2022-10-01 12:43:30 +0300
commite8cef65022100792363f74ebb9ac8c712349346a (patch)
tree68c3e927e3f524c03065339fd5136fa0b330bf7c
parentbfd5ea3b97d8410f7ff97613d5fdf16661cf541e (diff)
LOG
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
-rw-r--r--File Provider Extension/FileProviderData.swift2
-rw-r--r--Share/NCShareExtension.swift4
-rw-r--r--Widget/Dashboard/DashboardData.swift4
-rw-r--r--Widget/Files/FilesData.swift4
-rw-r--r--iOSClient/AppDelegate.swift48
-rw-r--r--iOSClient/Media/NCMedia.swift4
-rw-r--r--iOSClient/Networking/NCAutoUpload.swift20
-rw-r--r--iOSClient/Networking/NCNetworking.swift8
-rw-r--r--iOSClient/Networking/NCNetworkingCheckRemoteUser.swift2
-rw-r--r--iOSClient/Networking/NCNetworkingChunkedUpload.swift6
-rw-r--r--iOSClient/Networking/NCNetworkingProcessUpload.swift6
-rw-r--r--iOSClient/Networking/NCService.swift2
-rw-r--r--iOSClient/PushNotification/NCPushNotification.m4
-rwxr-xr-xiOSClient/Settings/CCAdvanced.m4
14 files changed, 55 insertions, 63 deletions
diff --git a/File Provider Extension/FileProviderData.swift b/File Provider Extension/FileProviderData.swift
index 23232b725..a24fc3b49 100644
--- a/File Provider Extension/FileProviderData.swift
+++ b/File Provider Extension/FileProviderData.swift
@@ -81,7 +81,7 @@ class fileProviderData: NSObject {
let levelLog = CCUtility.getLogLevel()
NKCommon.shared.levelLog = levelLog
let version = NSString(format: NCBrandOptions.shared.textCopyrightNextcloudiOS as NSString, NCUtility.shared.getVersionApp()) as String
- NKCommon.shared.writeLog("Start File Provider session with level \(levelLog) " + version + " (File Provider Extension)")
+ NKCommon.shared.writeLog("[INFO] Start File Provider session with level \(levelLog) " + version + " (File Provider Extension)")
}
// NO DOMAIN -> Set default account
diff --git a/Share/NCShareExtension.swift b/Share/NCShareExtension.swift
index 37cff2ecd..00abd8072 100644
--- a/Share/NCShareExtension.swift
+++ b/Share/NCShareExtension.swift
@@ -121,9 +121,9 @@ class NCShareExtension: UIViewController {
NKCommon.shared.pathLog = pathDirectoryGroup
}
if isSimulatorOrTestFlight {
- NKCommon.shared.writeLog("Start Share session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
+ NKCommon.shared.writeLog("[INFO] Start Share session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
} else {
- NKCommon.shared.writeLog("Start Share session with level \(levelLog) " + versionNextcloudiOS)
+ NKCommon.shared.writeLog("[INFO] Start Share session with level \(levelLog) " + versionNextcloudiOS)
}
// Colors
diff --git a/Widget/Dashboard/DashboardData.swift b/Widget/Dashboard/DashboardData.swift
index a4257dd50..0747f4f98 100644
--- a/Widget/Dashboard/DashboardData.swift
+++ b/Widget/Dashboard/DashboardData.swift
@@ -133,9 +133,9 @@ func getDashboardDataEntry(intent: Applications, isPreview: Bool, displaySize: C
NKCommon.shared.pathLog = pathDirectoryGroup
}
if isSimulatorOrTestFlight {
- NKCommon.shared.writeLog("Start \(NCBrandOptions.shared.brand) dashboard widget session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
+ NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) dashboard widget session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
} else {
- NKCommon.shared.writeLog("Start \(NCBrandOptions.shared.brand) dashboard widget session with level \(levelLog) " + versionNextcloudiOS)
+ NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) dashboard widget session with level \(levelLog) " + versionNextcloudiOS)
}
let (tableDashboard, tableButton) = NCManageDatabase.shared.getDashboardWidget(account: account.account, id: id)
diff --git a/Widget/Files/FilesData.swift b/Widget/Files/FilesData.swift
index 7a2e5699f..ea7aa99b2 100644
--- a/Widget/Files/FilesData.swift
+++ b/Widget/Files/FilesData.swift
@@ -194,9 +194,9 @@ func getFilesDataEntry(isPreview: Bool, displaySize: CGSize, completion: @escapi
NKCommon.shared.pathLog = pathDirectoryGroup
}
if isSimulatorOrTestFlight {
- NKCommon.shared.writeLog("Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
+ NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight)")
} else {
- NKCommon.shared.writeLog("Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS)
+ NKCommon.shared.writeLog("[INFO] Start \(NCBrandOptions.shared.brand) widget session with level \(levelLog) " + versionNextcloudiOS)
}
let options = NKRequestOptions(timeout: 15)
diff --git a/iOSClient/AppDelegate.swift b/iOSClient/AppDelegate.swift
index 9b89bc280..b43d9eb91 100644
--- a/iOSClient/AppDelegate.swift
+++ b/iOSClient/AppDelegate.swift
@@ -100,9 +100,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NKCommon.shared.levelLog = levelLog
NKCommon.shared.copyLogToDocumentDirectory = true
if isSimulatorOrTestFlight {
- NKCommon.shared.writeLog("Start session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight) in \(UIApplication.shared.applicationState)")
+ NKCommon.shared.writeLog("[INFO] Start session with level \(levelLog) " + versionNextcloudiOS + " (Simulator / TestFlight) in \(UIApplication.shared.applicationState)")
} else {
- NKCommon.shared.writeLog("Start session with level \(levelLog) " + versionNextcloudiOS + " in \(UIApplication.shared.applicationState)")
+ NKCommon.shared.writeLog("[INFO] Start session with level \(levelLog) " + versionNextcloudiOS + " in \(UIApplication.shared.applicationState)")
}
}
@@ -110,7 +110,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if let account = NCManageDatabase.shared.getActiveAccount() {
NKCommon.shared.writeLog("Account active \(account.account)")
if CCUtility.getPassword(account.account).isEmpty {
- NKCommon.shared.writeLog("PASSWORD NOT FOUND for \(account.account)")
+ NKCommon.shared.writeLog("[ERROR] PASSWORD NOT FOUND for \(account.account)")
}
}
@@ -152,9 +152,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// Start process Upload, Initialize
if UIApplication.shared.applicationState == .background {
- NKCommon.shared.writeLog("Process in background, denied process upload and Inizialize main")
+ NKCommon.shared.writeLog("[INFO] Process in background, denied process upload and Inizialize main")
} else {
- NKCommon.shared.writeLog("Starting process upload and Inizialize main")
+ NKCommon.shared.writeLog("[INFO] Starting process upload and Inizialize main")
networkingProcessUpload = NCNetworkingProcessUpload()
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize, userInfo:["atStart":1])
}
@@ -239,16 +239,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterInitialize)
}
- NKCommon.shared.writeLog("Application will enter in foreground")
+ NKCommon.shared.writeLog("[INFO] Application will enter in foreground")
- // START TIMER UPLOAD PROCESS
- if NCUtility.shared.isSimulator() {
- networkingProcessUpload?.startTimer()
- }
-
// Initialize Auto upload
NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
- NKCommon.shared.writeLog("Initialize Auto upload with \(items) uploads")
+ NKCommon.shared.writeLog("[INFO] Initialize Auto upload with \(items) uploads")
}
// Required unsubscribing / subscribing
@@ -300,11 +295,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if account == "" { return }
- // STOP TIMER UPLOAD PROCESS
- if NCUtility.shared.isSimulator() {
- networkingProcessUpload?.stopTimer()
- }
-
scheduleAppRefresh()
scheduleAppProcessing()
@@ -326,14 +316,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
@objc private func initialize() {
guard !account.isEmpty else { return }
- NKCommon.shared.writeLog("initialize Main")
+ NKCommon.shared.writeLog("[INFO] initialize Main")
// Registeration push notification
NCPushNotification.shared().pushNotification()
// Start Auto Upload
NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
- NKCommon.shared.writeLog("Initialize Auto upload with \(items) uploads")
+ NKCommon.shared.writeLog("[INFO] Initialize Auto upload with \(items) uploads")
}
// Start services
@@ -364,9 +354,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
request.earliestBeginDate = Date(timeIntervalSinceNow: 6 * 60) // Refresh after 6 minutes.
do {
try BGTaskScheduler.shared.submit(request)
- NKCommon.shared.writeLog("Refresh task success submit request 6 minutes \(request)")
+ NKCommon.shared.writeLog("[SUCCESS] Refresh task success submit request 6 minutes \(request)")
} catch {
- NKCommon.shared.writeLog("Refresh task failed to submit request: \(error)")
+ NKCommon.shared.writeLog("[ERROR] Refresh task failed to submit request: \(error)")
}
}
@@ -381,9 +371,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
request.requiresExternalPower = false
do {
try BGTaskScheduler.shared.submit(request)
- NKCommon.shared.writeLog("Background Processing task success submit request 5 minutes \(request)")
+ NKCommon.shared.writeLog("[SUCCESS] Background Processing task success submit request 5 minutes \(request)")
} catch {
- NKCommon.shared.writeLog("Background Processing task failed to submit request: \(error)")
+ NKCommon.shared.writeLog("[ERROR] Background Processing task failed to submit request: \(error)")
}
}
@@ -395,10 +385,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
return
}
- NKCommon.shared.writeLog("Start handler refresh task [Auto upload]")
+ NKCommon.shared.writeLog("[INFO] Start handler refresh task [Auto upload]")
NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
- NKCommon.shared.writeLog("Completition handler refresh task [Auto upload] with \(items) uploads")
+ NKCommon.shared.writeLog("[INFO] Completition handler refresh task [Auto upload] with \(items) uploads")
task.setTaskCompleted(success: true)
}
}
@@ -411,10 +401,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
return
}
- NKCommon.shared.writeLog("Start handler processing task [Auto upload]")
+ NKCommon.shared.writeLog("[INFO] Start handler processing task [Auto upload]")
NCAutoUpload.shared.initAutoUpload(viewController: nil) { items in
- NKCommon.shared.writeLog("Completition handler procesing task [Auto upload] with \(items) uploads")
+ NKCommon.shared.writeLog("[INFO] Completition handler procesing task [Auto upload] with \(items) uploads")
task.setTaskCompleted(success: true)
}
}
@@ -423,7 +413,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
- NKCommon.shared.writeLog("Start handle Events For Background URLSession: \(identifier)")
+ NKCommon.shared.writeLog("[INFO] Start handle Events For Background URLSession: \(identifier)")
backgroundSessionCompletionHandler = completionHandler
}
@@ -678,7 +668,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
let popup = NCPopupViewController(contentController: vcAccountRequest, popupWidth: 300, popupHeight: height+20)
popup.backgroundAlpha = 0.8
- UIApplication.shared.keyWindow?.rootViewController?.present(popup, animated: true)
+ window?.rootViewController?.present(popup, animated: true)
vcAccountRequest.startTimer()
}
diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift
index efdf5a0f3..660c42f65 100644
--- a/iOSClient/Media/NCMedia.swift
+++ b/iOSClient/Media/NCMedia.swift
@@ -548,7 +548,7 @@ extension NCMedia {
self.researchOldMedia(value: value, limit: limit, withElseReloadDataSource: false)
}
} else if error != .success {
- NKCommon.shared.writeLog("Media search old media error code \(error.errorCode) " + error.errorDescription)
+ NKCommon.shared.writeLog("[INFO] Media search old media error code \(error.errorCode) " + error.errorDescription)
}
}
}
@@ -624,7 +624,7 @@ extension NCMedia {
} else if error == .success && files.count == 0 && self.metadatas.count == 0 {
self.searchOldMedia()
} else if error != .success {
- NKCommon.shared.writeLog("Media search new media error code \(error.errorCode) " + error.errorDescription)
+ NKCommon.shared.writeLog("[ERROR] Media search new media error code \(error.errorCode) " + error.errorDescription)
}
}
}
diff --git a/iOSClient/Networking/NCAutoUpload.swift b/iOSClient/Networking/NCAutoUpload.swift
index 8bf78dfa4..ca898da74 100644
--- a/iOSClient/Networking/NCAutoUpload.swift
+++ b/iOSClient/Networking/NCAutoUpload.swift
@@ -86,11 +86,11 @@ class NCAutoUpload: NSObject {
self.getCameraRollAssets(viewController: viewController, account: account, selector: selector, alignPhotoLibrary: false) { assets in
guard let assets = assets, !assets.isEmpty else {
- NKCommon.shared.writeLog("Automatic upload, no new assets found [" + log + "]")
+ NKCommon.shared.writeLog("[INFO] Automatic upload, no new assets found [" + log + "]")
completion(0)
return
}
- NKCommon.shared.writeLog("Automatic upload, new \(assets.count) assets found [" + log + "]")
+ NKCommon.shared.writeLog("[INFO] Automatic upload, new \(assets.count) assets found [" + log + "]")
// Create the folder for auto upload & if request the subfolders
if !NCNetworking.shared.createFolder(assets: assets, selector: selector, useSubFolder: account.autoUploadCreateSubfolder, account: account.account, urlBase: account.urlBase) {
#if !EXTENSION
@@ -164,7 +164,7 @@ class NCAutoUpload: NSObject {
metadata.classFile = NKCommon.typeClassFile.image.rawValue
}
if selector == NCGlobal.shared.selectorUploadAutoUpload {
- NKCommon.shared.writeLog("Automatic upload added \(metadata.fileNameView) with Identifier \(metadata.assetLocalIdentifier)")
+ NKCommon.shared.writeLog("[INFO] Automatic upload added \(metadata.fileNameView) with Identifier \(metadata.assetLocalIdentifier)")
NCManageDatabase.shared.addPhotoLibrary([asset], account: account.account)
}
metadatas.append(metadata)
@@ -172,15 +172,17 @@ class NCAutoUpload: NSObject {
}
self.endForAssetToUpload = true
- // AUTO UPLOAD ALL
- #if !EXTENSION
+
if selector == NCGlobal.shared.selectorUploadAutoUploadAll {
+ NKCommon.shared.writeLog("[INFO] Start Upload All")
+ #if !EXTENSION
(UIApplication.shared.delegate as! AppDelegate).networkingProcessUpload?.createProcessUploads(metadatas: metadatas)
completion(metadatas.count)
+ #endif
+ } else if selector == NCGlobal.shared.selectorUploadAutoUpload {
+ NKCommon.shared.writeLog("[INFO] Start Upload")
+ self.createProcessUploads(metadatas: metadatas, completion: completion)
}
- #endif
- // AUTO UPLOAD
- self.createProcessUploads(metadatas: metadatas, completion: completion)
}
}
}
@@ -256,7 +258,7 @@ class NCAutoUpload: NSObject {
guard let assets = assets else { return }
NCManageDatabase.shared.addPhotoLibrary(assets, account: activeAccount.account)
- NKCommon.shared.writeLog("Align Photo Library \(assets.count)")
+ NKCommon.shared.writeLog("[INFO] Align Photo Library \(assets.count)")
}
}
diff --git a/iOSClient/Networking/NCNetworking.swift b/iOSClient/Networking/NCNetworking.swift
index f0a5276f1..f6500a74e 100644
--- a/iOSClient/Networking/NCNetworking.swift
+++ b/iOSClient/Networking/NCNetworking.swift
@@ -150,7 +150,7 @@ import Photos
#if !EXTENSION
if let appDelegate = UIApplication.shared.delegate as? AppDelegate, let completionHandler = appDelegate.backgroundSessionCompletionHandler {
- NKCommon.shared.writeLog("Called urlSessionDidFinishEvents for Background URLSession")
+ NKCommon.shared.writeLog("[INFO] Called urlSessionDidFinishEvents for Background URLSession")
appDelegate.backgroundSessionCompletionHandler = nil
completionHandler()
}
@@ -400,7 +400,7 @@ import Photos
completion: @escaping (_ error: NKError) -> () = { error in }) {
let metadata = tableMetadata.init(value: metadata)
- NKCommon.shared.writeLog("Upload file \(metadata.fileNameView) with Identifier \(metadata.assetLocalIdentifier) with size \(metadata.size) [CHUNCK \(metadata.chunk), E2EE \(metadata.e2eEncrypted)]")
+ NKCommon.shared.writeLog("[INFO] Upload file \(metadata.fileNameView) with Identifier \(metadata.assetLocalIdentifier) with size \(metadata.size) [CHUNCK \(metadata.chunk), E2EE \(metadata.e2eEncrypted)]")
if metadata.e2eEncrypted {
#if !EXTENSION_FILE_PROVIDER_EXTENSION && !EXTENSION_WIDGET
@@ -561,7 +561,7 @@ import Photos
NCUtilityFileSystem.shared.deleteFile(filePath: CCUtility.getDirectoryProviderStorageOcId(ocIdTemp))
}
- NKCommon.shared.writeLog("Upload complete " + serverUrl + "/" + fileName + ", result: success(\(size) bytes)")
+ NKCommon.shared.writeLog("[SUCCESS] Upload complete " + serverUrl + "/" + fileName + ", result: success(\(size) bytes)")
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterUploadedFile, userInfo: ["ocId": metadata.ocId, "serverUrl": metadata.serverUrl, "account": metadata.account, "fileName": metadata.fileName, "ocIdTemp": ocIdTemp, "error": error])
} else {
if error.errorCode == NSURLErrorCancelled || error.errorCode == NCGlobal.shared.errorRequestExplicityCancelled {
@@ -573,7 +573,7 @@ import Photos
} else {
if size == 0 {
errorDescription = "File length 0"
- NKCommon.shared.writeLog("Upload error 0 length " + serverUrl + "/" + fileName + ", result: success(\(size) bytes)")
+ NKCommon.shared.writeLog("[ERROR] Upload error 0 length " + serverUrl + "/" + fileName)
}
NCManageDatabase.shared.setMetadataSession(ocId: metadata.ocId, session: nil, sessionError: errorDescription, sessionTaskIdentifier: 0, status: NCGlobal.shared.metadataStatusUploadError)
NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterUploadedFile, userInfo: ["ocId": metadata.ocId, "serverUrl": metadata.serverUrl, "account": metadata.account, "fileName": metadata.fileName, "ocIdTemp": ocIdTemp, "error": error])
diff --git a/iOSClient/Networking/NCNetworkingCheckRemoteUser.swift b/iOSClient/Networking/NCNetworkingCheckRemoteUser.swift
index 78923c133..16e7dc0da 100644
--- a/iOSClient/Networking/NCNetworkingCheckRemoteUser.swift
+++ b/iOSClient/Networking/NCNetworkingCheckRemoteUser.swift
@@ -64,7 +64,7 @@ class NCNetworkingCheckRemoteUser {
let error = NKError(errorCode: error.errorCode, errorDescription: description)
NCContentPresenter.shared.showError(error: error, priority: .max)
CCUtility.setPassword(account, password: nil)
- NKCommon.shared.writeLog("Password removed.")
+ NKCommon.shared.writeLog("[INFO] Password removed.")
appDelegate.deletePasswordSession = true
}
}
diff --git a/iOSClient/Networking/NCNetworkingChunkedUpload.swift b/iOSClient/Networking/NCNetworkingChunkedUpload.swift
index 165079da8..b445b9b7c 100644
--- a/iOSClient/Networking/NCNetworkingChunkedUpload.swift
+++ b/iOSClient/Networking/NCNetworkingChunkedUpload.swift
@@ -88,7 +88,7 @@ extension NCNetworking {
}, taskHandler: { task in
NCManageDatabase.shared.setMetadataSession(ocId: metadata.ocId, sessionError: "", sessionTaskIdentifier: task.taskIdentifier, status: NCGlobal.shared.metadataStatusUploading)
- NKCommon.shared.writeLog("Upload chunk: " + fileName)
+ NKCommon.shared.writeLog("[INFO] Upload chunk: " + fileName)
}, progressHandler: { progress in
@@ -155,7 +155,7 @@ extension NCNetworking {
NextcloudKit.shared.moveFileOrFolder(serverUrlFileNameSource: serverUrlFileNameSource, serverUrlFileNameDestination: serverUrlFileNameDestination, overwrite: true, options: options) { _, error in
- NKCommon.shared.writeLog("Assembling chunk with error code: \(error.errorCode)")
+ NKCommon.shared.writeLog("[ERROR] Assembling chunk with error code: \(error.errorCode)")
guard error == .success else {
self.uploadChunkFileError(metadata: metadata, chunkFolderPath: chunkFolderPath, directoryProviderStorageOcId: directoryProviderStorageOcId, error: error)
@@ -230,7 +230,7 @@ extension NCNetworking {
var errorDescription = error.errorDescription
- NKCommon.shared.writeLog("Upload chunk error code: \(error.errorCode)")
+ NKCommon.shared.writeLog("[ERROR] Upload chunk error code: \(error.errorCode)")
if error.errorCode == NSURLErrorCancelled || error.errorCode == NCGlobal.shared.errorRequestExplicityCancelled {
diff --git a/iOSClient/Networking/NCNetworkingProcessUpload.swift b/iOSClient/Networking/NCNetworkingProcessUpload.swift
index 5ea616dbf..042325e08 100644
--- a/iOSClient/Networking/NCNetworkingProcessUpload.swift
+++ b/iOSClient/Networking/NCNetworkingProcessUpload.swift
@@ -76,20 +76,20 @@ class NCNetworkingProcessUpload: NSObject {
let limit = NCGlobal.shared.maxConcurrentOperationUpload - counterUpload
let metadatas = NCManageDatabase.shared.getAdvancedMetadatas(predicate: NSPredicate(format: "sessionSelector == %@ AND status == %d", sessionSelector, NCGlobal.shared.metadataStatusWaitUpload), page: 1, limit: limit, sorted: "date", ascending: true)
if metadatas.count > 0 {
- NKCommon.shared.writeLog("PROCESS-UPLOAD find \(metadatas.count) items")
+ NKCommon.shared.writeLog("[INFO] PROCESS-UPLOAD find \(metadatas.count) items")
}
for metadata in metadatas {
// Different account
if account.account != metadata.account {
- NKCommon.shared.writeLog("Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView) on account: \(metadata.account), because the actual account is \(account.account).")
+ NKCommon.shared.writeLog("[INFO] Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView) on account: \(metadata.account), because the actual account is \(account.account).")
continue
}
// Is already in upload background? skipped
if listOcId.contains(metadata.ocId) {
- NKCommon.shared.writeLog("Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView), because is already in session.")
+ NKCommon.shared.writeLog("[INFO] Process auto upload skipped file: \(metadata.serverUrl)/\(metadata.fileNameView), because is already in session.")
continue
}
diff --git a/iOSClient/Networking/NCService.swift b/iOSClient/Networking/NCService.swift
index 7d4c50399..6b94607c8 100644
--- a/iOSClient/Networking/NCService.swift
+++ b/iOSClient/Networking/NCService.swift
@@ -112,7 +112,7 @@ class NCService: NSObject {
guard error == .success, account == self.appDelegate.account else {
// Ops the server has Unauthorized
- NKCommon.shared.writeLog("The server has response with Unauthorized \(error.errorCode)")
+ NKCommon.shared.writeLog("[ERROR] The server has response with Unauthorized \(error.errorCode)")
DispatchQueue.main.async {
if (UIApplication.shared.applicationState == .active) &&
diff --git a/iOSClient/PushNotification/NCPushNotification.m b/iOSClient/PushNotification/NCPushNotification.m
index ade1f398a..022ce68c6 100644
--- a/iOSClient/PushNotification/NCPushNotification.m
+++ b/iOSClient/PushNotification/NCPushNotification.m
@@ -112,7 +112,7 @@
[[NextcloudKit shared] subscribingPushProxyWithProxyServerUrl:proxyServerPath pushToken:self.pushKitToken deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completion:^(NKError *error) {
if (error == NKError.success) {
- [[NKCommon shared] writeLog:@"Subscribed to Push Notification server & proxy successfully"];
+ [[NKCommon shared] writeLog:@"[INFO] Subscribed to Push Notification server & proxy successfully"];
[CCUtility setPushNotificationToken:account token:self.pushKitToken];
[CCUtility setPushNotificationDeviceIdentifier:account deviceIdentifier:deviceIdentifier];
@@ -139,7 +139,7 @@
[[NextcloudKit shared] unsubscribingPushProxyWithProxyServerUrl:proxyServerPath deviceIdentifier:deviceIdentifier signature:signature publicKey:publicKey userAgent:userAgent queue:dispatch_get_main_queue() completion:^(NKError *error) {
if (error == NKError.success) {
- [[NKCommon shared] writeLog:@"Unsubscribed to Push Notification server & proxy successfully."];
+ [[NKCommon shared] writeLog:@"[INFO] Unsubscribed to Push Notification server & proxy successfully."];
[CCUtility setPushNotificationPublicKey:account data:nil];
[CCUtility setPushNotificationSubscribingPublicKey:account publicKey:nil];
diff --git a/iOSClient/Settings/CCAdvanced.m b/iOSClient/Settings/CCAdvanced.m
index ad32bcd44..4592d60e7 100755
--- a/iOSClient/Settings/CCAdvanced.m
+++ b/iOSClient/Settings/CCAdvanced.m
@@ -174,9 +174,9 @@
BOOL isSimulatorOrTestFlight = [[NCUtility shared] isSimulatorOrTestFlight];
NSString *versionNextcloudiOS = [NSString stringWithFormat:[NCBrandOptions shared].textCopyrightNextcloudiOS, [[NCUtility shared] getVersionAppWithBuild:true]];
if (isSimulatorOrTestFlight) {
- [[NKCommon shared] writeLog:[NSString stringWithFormat:@"Clear log with level %lu %@ (Simulator / TestFlight)", (unsigned long)logLevel, versionNextcloudiOS]];
+ [[NKCommon shared] writeLog:[NSString stringWithFormat:@"[INFO] Clear log with level %lu %@ (Simulator / TestFlight)", (unsigned long)logLevel, versionNextcloudiOS]];
} else {
- [[NKCommon shared] writeLog:[NSString stringWithFormat:@"Clear log with level %lu %@", (unsigned long)logLevel, versionNextcloudiOS]];
+ [[NKCommon shared] writeLog:[NSString stringWithFormat:@"[INFO] Clear log with level %lu %@", (unsigned long)logLevel, versionNextcloudiOS]];
}
};
[section addFormRow:row];