title: How to pass IHttpContextAccessor to Serilog Enricher by Configuration
body: <p>I wanted to add httpContextAccessor.HttpContext.TraceIdentifier to every log entry, so created a custom enricher, also i have it setup using Serilog.Settings.Configuration, but not sure how do i pass HttpContextAccessor to the Enricher through config</p>
  
  <pre><code>{
      "Enrich": ["FromLogContext", "LogTraceid"],
      "WriteTo": [{
          "Name": "File",
          "Args": {
              "path": "App_Data/Logs/App.log",
              "rollingInterval": "Day",
              "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{TraceId}] [{RequestId}] {Message}{NewLine}{Exception}"
          }
      }]
  }
  
  </code></pre>