From 56934e31831dae4b3824bfa581d32ddfa2a7f1e6 Mon Sep 17 00:00:00 2001 From: Sculas Date: Tue, 7 Jan 2025 15:15:31 +0100 Subject: [PATCH] refactor: Improve logging --- .../Services/Downloaders/SymlinkDownloader.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs b/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs index 406f5ed..be3fa0c 100644 --- a/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs +++ b/server/RdtClient.Service/Services/Downloaders/SymlinkDownloader.cs @@ -69,9 +69,13 @@ public class SymlinkDownloader(String uri, String destinationPath, String path, // If this somehow fails, fallback to the search below. if (File.Exists(potentialFilePath)) { + _logger.Debug($"Found file {path} at {potentialFilePath} using direct search"); file = potentialFilePath; goto skipFileSearch; } + + // Log if the file wasn't found and continue searching. + _logger.Warning($"Expected file {path} to be at {potentialFilePath} but it wasn't found. Continuing search (this will probably fail)."); } var potentialFilePaths = new List { searchPath };