HaemmerElectronics.SeppPenner.Serilog.Sinks.MicrosoftTeams 1.0.2.1

Serilog.Sinks.MicrosoftTeams is a library to save logging information from https://github.com/serilog/serilog to https://products.office.com/en-us/microsoft-teams/group-chat-software.
The assembly was written and tested in .Net Framework 4.8 and .Net Standard 2.0.

Install-Package HaemmerElectronics.SeppPenner.Serilog.Sinks.MicrosoftTeams -Version 1.0.2.1
dotnet add package HaemmerElectronics.SeppPenner.Serilog.Sinks.MicrosoftTeams --version 1.0.2.1
<PackageReference Include="HaemmerElectronics.SeppPenner.Serilog.Sinks.MicrosoftTeams" Version="1.0.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HaemmerElectronics.SeppPenner.Serilog.Sinks.MicrosoftTeams --version 1.0.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Serilog.Sinks.MicrosoftTeams

Serilog.Sinks.MicrosoftTeams is a library to save logging information from Serilog to Microsoft Teams.
The assembly was written and tested in .Net Framework 4.8 and .Net Standard 2.0.

Build status
GitHub issues
GitHub forks
GitHub stars
GitHub license
Nuget
NuGet Downloads
Known Vulnerabilities

Available for

  • NetFramework 4.5
  • NetFramework 4.6
  • NetFramework 4.6.2
  • NetFramework 4.7
  • NetFramework 4.7.2
  • NetFramework 4.8
  • NetStandard 2.0

Basic usage:

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.
Check https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors/connectors-using.

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

The project can be found on nuget.

Configuration options:

|Parameter|Meaning|Example|Default value|
|-|-|-|-|
|webHookUri|The Microsoft teams weebhook uri.|&quot;User ID=serilog;Password=serilog;Host=localhost;Port=5432;Database=Logs&quot;|None, is mandatory.|
|title|The title of the card.|&quot;Some Message&quot;|None, but is optional.|
|period|The time to wait between checking for event batches.|period: new TimeSpan(0, 0, 20)|00:00:05|
|formatProvider|The IFormatProvider to use. Supplies culture-specific formatting information. Check https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider?view=netframework-4.8.|new CultureInfo(&quot;de-DE&quot;)|null|
|batchSizeLimit|The maximum number of events to include in a single batch.|batchSizeLimit: 40|30|
|restrictedToMinimumLevel|The minimum level of the logging.|restrictedToMinimumLevel: LogEventLevel.Verbose|LogEventLevel.Verbose|

Further information:

This project is a fork of https://github.com/DixonDs/serilog-sinks-teams but is maintained.
Do not hesitate to create issues or pull requests.

Change history

  • Version 1.0.2.1 (2019-06-24) : Added option to only show from and to dates when the dates are not equal.
  • Version 1.0.2.0 (2019-06-23) : Fixed icon in nuget package.
  • Version 1.0.0.1 (2019-06-21) : Added option for minimal log level.
  • Version 1.0.0.0 (2019-06-21) : 1.0 release.

Serilog.Sinks.MicrosoftTeams

Serilog.Sinks.MicrosoftTeams is a library to save logging information from Serilog to Microsoft Teams.
The assembly was written and tested in .Net Framework 4.8 and .Net Standard 2.0.

Build status
GitHub issues
GitHub forks
GitHub stars
GitHub license
Nuget
NuGet Downloads
Known Vulnerabilities

Available for

  • NetFramework 4.5
  • NetFramework 4.6
  • NetFramework 4.6.2
  • NetFramework 4.7
  • NetFramework 4.7.2
  • NetFramework 4.8
  • NetStandard 2.0

Basic usage:

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.
Check https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/connectors/connectors-using.

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

The project can be found on nuget.

Configuration options:

|Parameter|Meaning|Example|Default value|
|-|-|-|-|
|webHookUri|The Microsoft teams weebhook uri.|&quot;User ID=serilog;Password=serilog;Host=localhost;Port=5432;Database=Logs&quot;|None, is mandatory.|
|title|The title of the card.|&quot;Some Message&quot;|None, but is optional.|
|period|The time to wait between checking for event batches.|period: new TimeSpan(0, 0, 20)|00:00:05|
|formatProvider|The IFormatProvider to use. Supplies culture-specific formatting information. Check https://docs.microsoft.com/en-us/dotnet/api/system.iformatprovider?view=netframework-4.8.|new CultureInfo(&quot;de-DE&quot;)|null|
|batchSizeLimit|The maximum number of events to include in a single batch.|batchSizeLimit: 40|30|
|restrictedToMinimumLevel|The minimum level of the logging.|restrictedToMinimumLevel: LogEventLevel.Verbose|LogEventLevel.Verbose|

Further information:

This project is a fork of https://github.com/DixonDs/serilog-sinks-teams but is maintained.
Do not hesitate to create issues or pull requests.

Change history

  • Version 1.0.2.1 (2019-06-24) : Added option to only show from and to dates when the dates are not equal.
  • Version 1.0.2.0 (2019-06-23) : Fixed icon in nuget package.
  • Version 1.0.0.1 (2019-06-21) : Added option for minimal log level.
  • Version 1.0.0.0 (2019-06-21) : 1.0 release.

Release Notes

Version 1.0.2.1 (2019-06-24): Added option to only show from and to dates when the dates are not equal.
   Version 1.0.2.0 (2019-06-23): Fixed icon in nuget package.
       Version 1.0.0.1 (2019-06-21): Added option for minimal log level.
   Version 1.0.0.0 (2019-06-21): 1.0 release.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2.1 102 6/24/2019
1.0.2 57 6/23/2019
1.0.1 57 6/21/2019
1.0.0 57 6/21/2019