Changes on messages

This commit is contained in:
2026-03-28 21:26:45 +01:00
parent 4fa341d2c8
commit 2518101a52
25 changed files with 153 additions and 179 deletions
+5 -5
View File
@@ -1,4 +1,4 @@
using Ardalis.Result;
using Ardalis.Result;
using Microsoft.Extensions.Logging;
using Musify.Application.Contracts.Infrastructure;
using SixLabors.ImageSharp;
@@ -13,7 +13,7 @@ namespace Musify.Infrastructure.Pictures
{
try
{
logger.LogDebug("Resizing picture to={Width}x{Height}", width, height);
logger.LogDebug("Resizing picture to {Width}x{Height}", width, height);
if (pictureStream.CanSeek && pictureStream.Position > 0)
pictureStream.Position = 0;
@@ -31,13 +31,13 @@ namespace Musify.Infrastructure.Pictures
memoryStream.Position = 0;
logger.LogDebug("Picture resized successfully. OutputLength={Length}", memoryStream.Length);
logger.LogDebug("Picture resized to {Width}x{Height}, length: {Length}", width, height, memoryStream.Length);
return Result<Stream>.Success(memoryStream);
}
catch (Exception exception)
{
logger.LogError(exception, "An error occurred while resizing the picture to={Width}x{Height}.", width, height);
return Result.Error("An error occurred while resizing the picture.");
logger.LogError(exception, "Failed to resize picture to {Width}x{Height}", width, height);
return Result.Error("Failed to resize picture");
}
}
}