serilog-contrib / serilog-sinks-slack

A simple (yet customizable) Slack logging sink for Serilog
MIT License
40 stars 28 forks source link

Sink not working in .NET Framework 4.5.2 #40

Closed TrapperHell closed 2 years ago

TrapperHell commented 2 years ago

Based on a reproducible report by @GFoley83 in issue #23 . The following code should work (and does on .NET Core) but does not when targetting .NET Framework 4.5.2

var config = new LoggerConfiguration().WriteTo.Slack("https://hooks.slack.com/services/XXX");
Log.Logger = config.CreateLogger();

Log.Logger.Information("Hello world");
Log.CloseAndFlush();
GFoley83 commented 2 years ago

@TrapperHell I can confirm that v.2.2.1 works as expected with .NET Frameworks v4.5.2. Thanks for your help!