title: How to setup serilog SEQ for .NET Core 3.0 Worker Service
body: <p>Logging is working but it is not posting to my local seq, I tried adding serilog and also useSerilog but it does not logging into my local service: <a href="https://stackoverflow.com/questions/56941898/how-to-setup-event-log-for-net-core-3-0-worker-service">related question</a></p>
  
  <p>.csproj</p>
  
  <pre><code>&lt;ItemGroup&gt;
  &lt;PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.1" /&gt;
  &lt;PackageReference Include="Serilog" Version="2.8.0" /&gt;
  &lt;PackageReference Include="Serilog.AspNetCore" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" /&gt;
  &lt;PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" /&gt;
  &lt;PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" /&gt;
  &lt;PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /&gt;
  &lt;PackageReference Include="System.Configuration.ConfigurationManager" Version="4.6.0" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Program</p>
  
  <pre><code>public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
          Host.CreateDefaultBuilder(args)
              .ConfigureLogging(loggingBuilder =&gt; {
                  loggingBuilder.AddEventLog();
                  loggingBuilder.AddSerilog();
              })
              .ConfigureServices((hostContext, services) =&gt;
              {
                  services.AddHostedService&lt;Worker&gt;();
              })
              .UseSerilog();
  </code></pre>
  
  <p>appSettings.json:</p>
  
  <pre><code>"Serilog": {
  "LevelSwitches": { "$controlSwitch": "Verbose" },
  "MinimumLevel": { "ControlledBy": "$controlSwitch" },
  "WriteTo": [
    {
      "Name": "Seq",
      "Args": {
        "serverUrl": "http://localhost:5341",
        "apiKey": "yeEZyL3SMcxEKUijBjN",
        "controlLevelSwitch": "$controlSwitch"
      }
    }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>Am I missing some configuration or any Nuget package? I have been successfully using seq in ASP.NET Core API, but so far cannot use it in a worker service.</p>