I am configuring Serilog for my application. The intent is to configure Serilog completely through appsettings.json. My problem is, everywhere on the web, Elasticsearch's configuration is explained with C# code.
Meanwhile, I have this in appsettings.json:
    "WriteTo": [
      {
        "Name": "Elasticsearch",
        "Args": {
          "Uri": "http://localhost:5601"
        }
      },
      {
        "Name": "Console"
      }
    ]
However, the Elasticsearch sink doesn't pick up this configuration, and 1st chance exceptions show that it is trying to connect to the default port 9200.
What am I doing wrong?