Improve logging in ShareeSuggestionsDataSource
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 3 Apr 2024 12:41:08 +0000 (20:41 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Apr 2024 08:39:04 +0000 (16:39 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/ShareeSuggestionsDataSource.swift

index 604efff32c67c79b1eba4b60569c4ceac9c0fec0..a8b247e9c3c2adca610c33bfaa76e308a08b60cf 100644 (file)
@@ -23,11 +23,13 @@ class ShareeSuggestionsDataSource: SuggestionsDataSource {
 
     private func updateSuggestions() async {
         let sharees = await fetchSharees(search: inputString)
+        Logger.shareeDataSource.info("Fetched \(sharees.count, privacy: .public) sharees.")
         suggestions = suggestionsFromSharees(sharees)
         NotificationCenter.default.post(name: SuggestionsChangedNotificationName, object: self)
     }
 
     private func fetchSharees(search: String) async -> [NKSharee] {
+        Logger.shareeDataSource.debug("Searching sharees with: \(search, privacy: .public)")
         return await withCheckedContinuation { continuation in
             kit.searchSharees(
                 search: inputString,