Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed CA2017 suppression; fixed Logger.LogWarning
  • Loading branch information
surayya-MS committed Apr 4, 2023
commit 84dfd5ec074173377e48db884d2ecef956357e97
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ public override void Dispose()
}
catch (Exception ex)
{
#pragma warning disable CA2017 // Parameter count mismatch
Logger.LogWarning(0, "Failed to stop the server.", ex);
#pragma warning restore CA2017 // Parameter count mismatch
Logger.LogWarning(0, ex, "Failed to stop the server.");
}

try
Expand All @@ -135,7 +133,7 @@ public override void Dispose()
}
catch (Exception ex)
{
Logger.LogWarning(0, $"Failed to delete the deployed folder '{_deployedFolderPathInFileShare}'.", ex);
Logger.LogWarning(0, ex, $"Failed to delete the deployed folder '{_deployedFolderPathInFileShare}'.");
}

try
Expand All @@ -145,7 +143,7 @@ public override void Dispose()
}
catch (Exception ex)
{
Logger.LogWarning(0, $"Failed to delete the locally published folder '{DeploymentParameters.PublishedApplicationRootPath}'.", ex);
Logger.LogWarning(0, ex, $"Failed to delete the locally published folder '{DeploymentParameters.PublishedApplicationRootPath}'.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
}
catch (Exception ex)
{
_logger.LogWarning("Error sending request", ex);
_logger.LogWarning(ex, "Error sending request");
if (i == MaxRetries - 1)
{
throw;
Expand Down