Skip to content

Commit

Permalink
Merge pull request #31 from microsoft/hotfix/bc-fix-logging-messages
Browse files Browse the repository at this point in the history
update BlobStorageHandler logging errors
  • Loading branch information
Ben-Carpenter authored Jul 18, 2024
2 parents 93fa3d3 + b29bdf3 commit bc19b6e
Showing 1 changed file with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
--*/

using Azure;
Expand Down Expand Up @@ -40,17 +40,11 @@ public async Task Upload(string filePath)
}
catch (RequestFailedException rfe)
{
Console.WriteLine("{process} {method} - RequestFailedException error uploading blob. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(Download),
rfe.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(Download)} - RequestFailedException error uploading blob. Error - {rfe.Message}");
}
catch (Exception ex)
{
Console.WriteLine("{process} {method} - Exception uploading blob. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(DownloadToString),
ex.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(DownloadToString)} - Exception uploading blob. Error - {ex.Message}");
}

return;
Expand All @@ -74,17 +68,11 @@ public async Task Download(string filePath)
}
catch (RequestFailedException rfe)
{
Console.WriteLine("{process} {method} - RequestFailedException error downloading blob to file. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(Download),
rfe.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(Download)} - RequestFailedException error downloading blob to file. Error - {rfe.Message}");
}
catch (Exception ex)
{
Console.WriteLine("{process} {method} - Exception downloading blob to file. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(DownloadToString),
ex.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(DownloadToString)} - Exception downloading blob to file. Error - {ex.Message}");
}

return;
Expand Down Expand Up @@ -112,17 +100,11 @@ public async Task<string> DownloadToString()
}
catch (RequestFailedException rfe)
{
Console.WriteLine("{process} {method} - RequestFailedException error downloading blob to string. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(DownloadToString),
rfe.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(DownloadToString)} - RequestFailedException error downloading blob to string. Error - {rfe.Message}");
}
catch (Exception ex)
{
Console.WriteLine("{process} {method} - Exception downloading blob to string. Error - {errorMessage}",
nameof(BlobStorageHandler),
nameof(DownloadToString),
ex.Message);
Console.WriteLine($"{nameof(BlobStorageHandler)} {nameof(DownloadToString)} - Exception downloading blob to string. Error - {ex.Message}");
}

return string.Empty;
Expand Down

0 comments on commit bc19b6e

Please sign in to comment.