From 810c7d0b19da9afa5fd802bb41811aa7b8f5216a Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 14 Mar 2023 21:07:36 +0100 Subject: [PATCH] Also use logger in FileProviderSocketLineProcessor Signed-off-by: Claudio Cambra --- .../FileProviderSocketLineProcessor.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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") { -- 2.30.2