Skip to content

yegorandrosov/serilog-sinks-teams

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serilog.Sinks.MicrosoftTeams


NuGet Version

A Serilog event sink that writes to Microsoft Teams.

Package - Serilog.Sinks.MicrosoftTeams | Platforms - .NETStandard 1.1

You need to add an "Incoming Webhook" connector to your Teams channel and get it's URL. title is optional but can help your distinguish logs coming from different sources.

var log = new LoggerConfiguration()
    .WriteTo.MicrosoftTeams(webHookUri, title: title)
    .CreateLogger();

JSON configuration

It is possible to configure the sink using Serilog.Settings.Configuration by specifying the table name and connection string in appsettings.json:

"Serilog": {
  "WriteTo": [
    {"Name": "MicrosoftTeams", "Args": {"webHookUri": "", "title": ""}}
  ]
}

JSON configuration must be enabled using ReadFrom.Configuration(); see the documentation of the JSON configuration package for details.

About

A Serilog event sink that writes to Microsoft Teams

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 79.5%
  • PowerShell 20.5%