title: Configure .net core logging to log request and response
body: <p>I'm developing asp .net core 2.1 WEB-API application. </p>
  
  <p>I use ILogger with configuration:</p>
  
  <pre><code>"Logging": {
  "LogLevel": {
    "Default": "Debug",
    "System": "Information",
    "Microsoft": "Information"
  }
  </code></pre>
  
  <p>And on request i see log:</p>
  
  <blockquote>
    <p>info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
          Executing action method ActivationService.Controllers.ActivationController.Post
    (ActivationService) with arguments
    (ActivationService.Contracts.ActivationRequest) - Validation state:
    Valid</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>Executed action method
    ActivationService.Controllers.ActivationController.Post
    (ActivationService), returned result
    Microsoft.AspNetCore.Mvc.ObjectResult in 174605.9201ms.</p>
  </blockquote>
  
  <p>Is there way to confugure asp.net to log with trace <strong><em>body</em></strong> of response and request?</p>