serilog-contrib / Serilog.Sinks.MicrosoftTeams.Alternative

Serilog.Sinks.MicrosoftTeams.Alternative is a library to save logging information from Serilog to Microsoft Teams.
MIT License
32 stars 11 forks source link

The minimum level setting does not show the data properly. #4

Closed SeppPenner closed 5 years ago

SeppPenner commented 5 years ago

MinimumLevel isn't working properly (From https://github.com/SeppPenner/Serilog.Sinks.MicrosoftTeams/issues/1#issuecomment-545080734):

It works similar to another repo - it outputs everything to the channel. But the moment I put in the minimum level, it does nothing, even if I put in Information or manually tries to log it using logger.LogInformation("Information Test")..

JoeYong commented 5 years ago

Great, just to confirm - do I need to have Serilog.Sinks.MicrosoftTeams installed as well? I do have Serilog.Settings.Configuration already installed.

Serilog.Sinks.MicrosoftTeams

SeppPenner commented 5 years ago

do I need to have Serilog.Sinks.MicrosoftTeams installed as well?

The one in the link? No, this isn't required. This is just the old, not maintained version of the sink from @DixonDs. The projects are independent. Mine is a fork (with enhancements) of this sink.

Regarding the configuration part with appsettings. I've not yet checked how this works with Serilog. All I can tell is that I didn't explicitely add something to the sink to provide the functionality...

SeppPenner commented 5 years ago

I don't understand this yet... As far as I have tested this, it should work: https://github.com/SeppPenner/Serilog.Sinks.MicrosoftTeams/blob/10f27de25161ec39c121d610a8c8087a4d502c65/Serilog.Sinks.MicrosoftTeams/Serilog.Sinks.MicrosoftTeams/Sinks/MicrosoftTeams/MicrosoftTeamsSink.cs#L63

JoeYong commented 5 years ago

Sorry, my apology - it was my error. I fixed it and it is working now. Thanks for making this work! This can be closed now.