serilog-contrib / Serilog-Sinks-Discord

Serilog discord sink
17 stars 11 forks source link

Add a way to execute async #3

Closed javis86 closed 3 years ago

javis86 commented 3 years ago

I suggest include in the documentation access to an async way to publish messages to Discord. The way i found is using Async Sink from serilog-sinks-async:


 Log.Logger = new LoggerConfiguration()
                                .WriteTo.Async( a => 
                                    a.Discord(11223344556677, "xxxxxxxxxxxxx"))
                                .Enrich.FromLogContext()
                                .CreateLogger();
`
AblEdge commented 3 years ago

thank you @javis86 Ill take a look