This commit is contained in:
2026-03-23 17:22:47 +01:00
parent 75cb09dbf2
commit 7a81341218
7 changed files with 23 additions and 17 deletions
@@ -40,7 +40,7 @@ namespace Musify.Infrastructure.Messaging.Activities
if (!getFile.IsSuccess)
{
var errorMessage = string.Join("; ", getFile.Errors);
logger.LogError("Failed to download file from bucket. Bucket: {BucketName}, Key: {KeyName}, Errors: {Errors}",
logger.LogWarning("Failed to download file from bucket. Bucket: {BucketName}, Key: {KeyName}, Errors: {Errors}",
executeContext.Arguments.BucketName,
executeContext.Arguments.KeyName,
errorMessage);
@@ -34,8 +34,7 @@ namespace Musify.Infrastructure.Messaging.Activities
{
if (!File.Exists(executeContext.Arguments.SourceFilePath))
{
logger.LogError("Source file not found at {SourceFilePath}",
executeContext.Arguments.SourceFilePath);
logger.LogWarning("Source file not found at {SourceFilePath}", executeContext.Arguments.SourceFilePath);
throw new FileNotFoundException($"Source file not found: {executeContext.Arguments.SourceFilePath}");
}
@@ -67,7 +66,7 @@ namespace Musify.Infrastructure.Messaging.Activities
await using var destinationStream = File.Create(executeContext.Arguments.DestinationFilePath);
await resizedPicture.Value.CopyToAsync(destinationStream, executeContext.CancellationToken);
logger.LogInformation("Picture resized successfully from {SourceFilePath} to {DestinationFilePath} ( {Width}x{Height} )",
logger.LogDebug("Picture resized from {SourceFilePath} to {DestinationFilePath} ({Width}x{Height})",
executeContext.Arguments.SourceFilePath,
executeContext.Arguments.DestinationFilePath,
executeContext.Arguments.Width,
@@ -47,7 +47,7 @@ namespace Musify.Infrastructure.Messaging.Activities
if (!transferFilesResult.IsSuccess)
{
var errorMessage = string.Join("; ", transferFilesResult.Errors);
logger.LogError("Failed to transfer files from {FolderPath} to bucket {DestinationBucketName}, key {DestinationKeyName}. Errors: {Errors}",
logger.LogWarning("Failed to transfer files from {FolderPath} to bucket {DestinationBucketName}, key {DestinationKeyName}. Errors: {Errors}",
folderPath,
executeContext.Arguments.DestinationBucketName,
executeContext.Arguments.DestinationKeyName,
@@ -38,7 +38,7 @@ namespace Musify.Infrastructure.Messaging.Activities
if (playList is null)
{
logger.LogError("PlayList with id {PlayListId} not found",
logger.LogWarning("PlayList with id {PlayListId} not found",
executeContext.Arguments.PlayListId);
throw new InvalidOperationException($"PlayList with id {executeContext.Arguments.PlayListId} not found");
}
@@ -38,7 +38,7 @@ namespace Musify.Infrastructure.Messaging.Activities
if (track is null)
{
logger.LogError("Track with id {TrackId} not found",
logger.LogWarning("Track with id {TrackId} not found",
executeContext.Arguments.TrackId);
throw new InvalidOperationException($"Track with id {executeContext.Arguments.TrackId} not found");
}