Port #7571 from master to 2.0.x

Add log to UploadToLinuxPackageRepository

(cherry picked from commit 8b8aef7e44)
This commit is contained in:
William Li 2017-08-31 12:17:11 -07:00 committed by Nick Guerrera
parent c834676ecb
commit 36ee426998

View file

@ -65,6 +65,13 @@ namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
{ {
try try
{ {
Log.LogMessage(
MessageImportance.High,
"Begin uploading Linux Package to feed service, RepositoryId {0}, Server {1}, Package to upload {2}.",
RepositoryId,
Server,
PathOfPackageToUpload);
var linuxPackageRepositoryDestiny = var linuxPackageRepositoryDestiny =
new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId); new LinuxPackageRepositoryDestiny(Username, Password, Server, RepositoryId);
var uploadResponse = await new LinuxPackageRepositoryHttpPrepare( var uploadResponse = await new LinuxPackageRepositoryHttpPrepare(
@ -93,6 +100,12 @@ namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
5, 5,
() => ExponentialRetry.Timer(ExponentialRetry.Intervals), () => ExponentialRetry.Timer(ExponentialRetry.Intervals),
$"PullQueuedPackageStatus location: {queueResourceLocation.Location}"); $"PullQueuedPackageStatus location: {queueResourceLocation.Location}");
Log.LogMessage(
MessageImportance.High,
"Upload to feed service is completed, queue resource location {0}",
queueResourceLocation.Location);
return ""; return "";
} }
catch (FailedToAddPackageToPackageRepositoryException e) catch (FailedToAddPackageToPackageRepositoryException e)