title: Is there a way to set Serilog formatter variables via appsettings.json?
body: <p>I have the following <em>appsettings.json</em> configuration:</p>
  
  <pre><code>{
      "Serilog": {
          "Using": [],
          "MinimumLevel": {
              "Default": "Information",
              "Override": {
                  "Microsoft": "Warning",
                  "System": "Warning"
              }
          },
          "Enrich": [ "FromLogContext", "WithMachineName" ],
          "WriteTo": [
              {
                  "Name": "File",
                  "Args": {
                      "path": "C:\\Logs\\log.json",
                      "formatter": "Serilog.Formatting.Elasticsearch.ElasticsearchJsonFormatter, Serilog.Formatting.Elasticsearch"
                  }
              }
          ]
      }
  }
  </code></pre>
  
  <p>What I am trying to configure in the above appsettings.json file would be represented in C# as something like this:</p>
  
  <pre><code>Log.Logger = new LoggerConfiguration()
      .ReadFrom.Configuration(configuration)
      .WriteTo.File(new ElasticsearchJsonFormatter(inlineFields:true, renderMessageTemplate: false), @"C:\logs\log.json")
      .CreateLogger();
  </code></pre>
  
  <p>I need to set "inlineFields" equal to true and "renderMessageTemplate" equal to false as overrides in my appsettings.json file on the ElasticsearchJsonFormatter instance. Is there a way to do that in the appsettings.json file so that I can keep my configuration out of C#?</p>