Serilog-Sinks-Discord icon indicating copy to clipboard operation
Serilog-Sinks-Discord copied to clipboard

NET 6 Not working

Open norbertmarkiel opened this issue 2 years ago • 3 comments

Hello. I have a problem using this sink. After applying the following configuration

   Serilog.Log.Logger = new LoggerConfiguration().MinimumLevel.Verbose()
               .WriteTo.Discord(WebhookId, WebhookToken)
            //or async
            //.WriteTo.Async(a =>
            //a.Discord(WebhookId, WebhookToken))
            .WriteTo.Console(Serilog.Events.LogEventLevel.Verbose)
     .CreateLogger();

    Serilog.Log.Verbose("Test0");
    Serilog.Log.Information("Test1");
    Serilog.Log.Debug("Test2");
    Serilog.Log.Error("Test3");
    Serilog.Log.Fatal("Test4");

It receives logs to the console, but does not get them to the discord server via webhook. I have added a webhook to the server, and from it I fetched ID and Token. Additionally, I installed Serilog 2.12.0, DiscordNet.Webhook 2.6.1, and Serilog.Sink.Console 4.1.0 Can I ask for some hint?

norbertmarkiel avatar Dec 08 '22 14:12 norbertmarkiel