title: How do I configure serilog-sinks-slack in appsettings.json
body: <p>I am trying to configure serilog on my asp.net core application and I can set it up using the startup configuration, but I cannot do it on appsettings.json.
  When I do:</p>
  
  <p>I am using this sink:</p>
  
  <p><a href="https://github.com/mgibas/serilog-sinks-slack" rel="nofollow noreferrer">https://github.com/mgibas/serilog-sinks-slack</a></p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
          {
  Logger log = new LoggerConfiguration()
                  .MinimumLevel.Verbose()
                  .WriteTo.Slack(new SlackSinkOptions()
                  {
                      WebHookUrl = "https://hooks.slack.com/services/xxx/yyy/zzz",
                      CustomChannel = "@myuser"
                  }).CreateLogger();
      loggerFactory.AddSerilog(log);
  </code></pre>
  
  <p>It works fine and I can see the messages in my slack channel.
  Then I try to bring it in my app settings so I change it to this:</p>
  
  <pre><code>Logger log = new LoggerConfiguration()
  .MinimumLevel.Verbose()
  .ReadFrom.Configuration(Configuration)
  .CreateLogger();
  </code></pre>
  
  <p>and with the appconfig:</p>
  
  <pre><code>{
    "Serilog": {
      "MinimumLevel": "Debug",
      "WriteTo": [
        {
          "Name": "Slack",
          "SlackSinkOptions":
          {
            "WebHookUrl": "https://hooks.slack.com/services/xxx/yyy/zzz",
            "CustomChannel": "@myuser"
          }
        }
      ]
    },
    "AllowedHosts": "*"
  }
  </code></pre>
  
  <p>But it doesn't write anything in slack. I've also tried:</p>
  
  <pre><code>{
    "Serilog": {
      "MinimumLevel": "Debug",
      "WriteTo": [
        {
          "Name": "Slack",
          "WebHookUrl": "https://hooks.slack.com/services/xxx/yyy/zzz",
          "CustomChannel": "@myuser"
  
        }
      ]
    },
    "AllowedHosts": "*"
  }
  </code></pre>
  
  <p>Any clue what is worng with my config/setup?</p>