From: Claudio Cambra Date: Tue, 14 Mar 2023 20:07:36 +0000 (+0100) Subject: Also use logger in FileProviderSocketLineProcessor X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~10^2~55^2~98 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=810c7d0b19da9afa5fd802bb41811aa7b8f5216a;p=nextcloud-desktop.git Also use logger in FileProviderSocketLineProcessor Signed-off-by: Claudio Cambra --- diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderSocketLineProcessor.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderSocketLineProcessor.swift index 8a46f9d22..fcccf00ca 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderSocketLineProcessor.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderSocketLineProcessor.swift @@ -14,6 +14,7 @@ import Foundation import NCDesktopClientSocketKit +import OSLog class FileProviderSocketLineProcessor: NSObject, LineProcessor { var delegate: FileProviderExtension @@ -23,16 +24,20 @@ class FileProviderSocketLineProcessor: NSObject, LineProcessor { } func process(_ line: String) { - NSLog("Processing file provider line: %@", line) + if (line.contains("~")) { // We use this as the separator specifically in ACCOUNT_DETAILS + Logger.desktopClientConnection.debug("Processing file provider line with potentially sensitive user data") + } else { + Logger.desktopClientConnection.debug("Processing file provider line: \(line)") + } let splitLine = line.split(separator: ":", maxSplits: 1) guard let commandSubsequence = splitLine.first else { - NSLog("Input line did not have a first element") + Logger.desktopClientConnection.error("Input line did not have a first element") return; } let command = String(commandSubsequence); - NSLog("Received command: %@", command) + Logger.desktopClientConnection.debug("Received command: \(command)") if (command == "SEND_FILE_PROVIDER_DOMAIN_IDENTIFIER") { delegate.sendFileProviderDomainIdentifier() } else if (command == "ACCOUNT_NOT_AUTHENTICATED") {