From 9c19e83c8403544a0da15b6f6fcfee537322d078 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Sat, 15 Jun 2024 21:06:39 +0100 Subject: [PATCH] logging tidy. --- uSync.BackOffice/Services/SyncActionService.cs | 6 +++--- uSync.BackOffice/Services/SyncFileService.cs | 2 +- uSync.BackOffice/Services/uSyncService_Files.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/uSync.BackOffice/Services/SyncActionService.cs b/uSync.BackOffice/Services/SyncActionService.cs index a0f91632..111c7015 100644 --- a/uSync.BackOffice/Services/SyncActionService.cs +++ b/uSync.BackOffice/Services/SyncActionService.cs @@ -181,7 +181,7 @@ private string MakeValidImportFolder(string folder) if (fullPath.StartsWith(rootParent)) { - _logger.LogDebug("Using Custom Folder: {fullPath}", folder); + _logger.LogDebug("Using Custom Folder"); return folder; } @@ -197,8 +197,8 @@ public void FinishProcess(HandlerActions action, IEnumerable action { _uSyncService.FinishBulkProcess(action, actions); - _logger.LogInformation("{user} finished {action} process ({changes} changes)", - username, action, actions.Count()); + _logger.LogInformation("{user} finished process ({changes} changes)", + username, actions.Count()); } } diff --git a/uSync.BackOffice/Services/SyncFileService.cs b/uSync.BackOffice/Services/SyncFileService.cs index d892f0af..f63568a5 100644 --- a/uSync.BackOffice/Services/SyncFileService.cs +++ b/uSync.BackOffice/Services/SyncFileService.cs @@ -253,7 +253,7 @@ public XElement LoadXElement(string file) } catch (Exception ex) { - logger.LogWarning("Error while reading in {file} {message}", file, ex.Message); + logger.LogWarning("Error while reading in file {message}", ex.Message); throw new Exception($"Error while reading in {file}", ex); } } diff --git a/uSync.BackOffice/Services/uSyncService_Files.cs b/uSync.BackOffice/Services/uSyncService_Files.cs index ef0d63f5..9893625f 100644 --- a/uSync.BackOffice/Services/uSyncService_Files.cs +++ b/uSync.BackOffice/Services/uSyncService_Files.cs @@ -65,7 +65,7 @@ public void DeCompressFile(string zipArchive, string target) var filePath = GetOSDependentPath(entry.FullName); var destination = Path.GetFullPath(Path.Combine(resolvedTarget, filePath)); - if (!destination.StartsWith(fullTarget)) + if (destination.StartsWith(fullTarget) is false) throw new InvalidOperationException("Invalid file path"); var destinationFolder = Path.GetDirectoryName(destination);