Skip to content

Commit

Permalink
Added error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 11, 2023
1 parent 25de538 commit 91f69ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Foundatio.Storage.SshNet/Storage/SshNetFileStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public async Task<bool> RenameFileAsync(string path, string newPath, Cancellatio

_logger.LogTrace("Renaming {Path} to {NewPath}", normalizedPath, normalizedNewPath);
await _client.RenameFileAsync(normalizedPath, normalizedNewPath, cancellationToken).AnyContext();
} catch (Exception ex) {
_logger.LogError(ex, "Error renaming {Path} to {NewPath}: {Message}", normalizedPath, normalizedNewPath, ex.Message);
return false;
}

return true;
Expand Down

0 comments on commit 91f69ff

Please sign in to comment.