Serilog.Sinks.Twilio 1.0.9

A Serilog sink that transmits log events over SMS via Twilio.

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

Super simple to use

In the following example, the sink will transmit log events to PhoneNumber over SMS.

  var log = new LoggerConfiguration()
    .WriteTo.Twilio(
      accountSid: "<your_account_sid>",
      authToken: "<your_auth_token>",
      fromPhoneNumber: "<fromPhoneNumber>",
      toPhoneNumber: "<toPhoneNumber>",
      restrictedToMinimumLevel: LogEventLevel.Information)
    .CreateLogger();

  log.Information("Hello World!");

Super simple to configure

Used in conjunction with Serilog.Settings.Configuration the same sink can be configured in the following way:

{
  "Serilog": {
    "MinimumLevel": "Fatal",
    "WriteTo": [
      {
        "Name": "Twilio",
        "Args": {
          "accountSid": "your_account_sid",
          "authToken": "your_auth_token",
          "fromPhoneNumber": "from_phone_number",
          "toPhoneNumber": "to_phone_number"
        }
      }
    ]
  }
}

Super simple to use

In the following example, the sink will transmit log events to PhoneNumber over SMS.

  var log = new LoggerConfiguration()
    .WriteTo.Twilio(
      accountSid: "<your_account_sid>",
      authToken: "<your_auth_token>",
      fromPhoneNumber: "<fromPhoneNumber>",
      toPhoneNumber: "<toPhoneNumber>",
      restrictedToMinimumLevel: LogEventLevel.Information)
    .CreateLogger();

  log.Information("Hello World!");

Super simple to configure

Used in conjunction with Serilog.Settings.Configuration the same sink can be configured in the following way:

{
  "Serilog": {
    "MinimumLevel": "Fatal",
    "WriteTo": [
      {
        "Name": "Twilio",
        "Args": {
          "accountSid": "your_account_sid",
          "authToken": "your_auth_token",
          "fromPhoneNumber": "from_phone_number",
          "toPhoneNumber": "to_phone_number"
        }
      }
    ]
  }
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.9 414 2/26/2018
1.0.7 316 2/26/2018
1.0.0-master-local 299 2/25/2018