Skip to content

Commit

Permalink
logging tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJump committed Jun 15, 2024
1 parent d52e7ae commit 9c19e83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions uSync.BackOffice/Services/SyncActionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -197,8 +197,8 @@ public void FinishProcess(HandlerActions action, IEnumerable<uSyncAction> 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());
}

}
2 changes: 1 addition & 1 deletion uSync.BackOffice/Services/SyncFileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion uSync.BackOffice/Services/uSyncService_Files.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9c19e83

Please sign in to comment.