Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra logging to DownloadFile after all retries fail #14147

Merged
merged 1 commit into from Oct 20, 2023

Conversation

lewing
Copy link
Member

@lewing lewing commented Oct 20, 2023

Add extra logging for dotnet/installer#17588

cc @wfurt

@@ -183,6 +183,7 @@ private async Tasks.Task<bool> DownloadWithRetriesAsync(HttpClient httpClient, s
}

Log.LogMessage($"Retrying download of '{uri}' to '{DestinationPath}' due to failure: '{e.Message}' ({attempt}/{Retries})");
Log.LogErrorFromException(e, true, true, null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that log the inner exception as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lewing lewing marked this pull request as ready for review October 20, 2023 21:00
@lewing lewing enabled auto-merge (squash) October 20, 2023 21:15
@lewing lewing merged commit 025a2b3 into main Oct 20, 2023
11 checks passed
@lewing lewing deleted the log-download-file-full-exception branch October 22, 2023 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants