Skip to content

Commit

Permalink
feat: log response for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesnowy committed Nov 28, 2023
1 parent f0b9d69 commit 543fc09
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MediatR;
using System.Text.Json;
using MediatR;

using Microsoft.Extensions.Logging;

Expand Down Expand Up @@ -31,7 +32,7 @@ public async Task<TResponse> Handle(
{
_logger.LogDebug("Handling {@Request}", request);
var result = await next();
_logger.LogDebug("Handled {@Request}", request);
_logger.LogDebug("Handled {@Request}, Response: {Response}", request, JsonSerializer.Serialize(result));
return result;
}
}
}

0 comments on commit 543fc09

Please sign in to comment.