Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Last active September 15, 2017 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/439124d124333de53c01024c968ab5f6 to your computer and use it in GitHub Desktop.
Save dcomartin/439124d124333de53c01024c968ab5f6 to your computer and use it in GitHub Desktop.
public class AddToCartLogger : IRequestPostProcessor<AddToCart, Unit>
{
private readonly ILogger<AddToCart> _logger;
public AddToCartLogger(ILogger<AddToCart> logger)
{
_logger = logger;
}
public Task Process(AddToCart request, Unit response)
{
_logger.LogInformation("Album {albumId} was added to the cart.", request.AlbumId);
return Task.CompletedTask;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment