lable / serilog-sinks-exceptionless

Writes events from Serilog to the Exceptionless logging service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serilog.Sinks.Exceptionless

Build Windows Build OSX Build Linux NuGet Version

Getting started

To use the Exceptionless sink, first install the NuGet package:

Install-Package Serilog.Sinks.Exceptionless

Next, we need to ensure that Exceptionless is configured with an API Key. If you are already using Exceptionless you can skip this step.

The Exceptionless sink will use the default ExceptionlessClient client instance. This ensures that all of your Exceptionless configuration is shared with the sink and also enables logging of unhandled exceptions to Exceptionless.

For advanced users who wish to configure the sink to use custom ExceptionlessClient instance you can provide an API Key or ExceptionlessClient instance to WriteTo.Exceptionless().

using Exceptionless;
ExceptionlessClient.Default.Startup("API_KEY");

Next, enable the sink using WriteTo.Exceptionless()

Log.Logger = new LoggerConfiguration()
    .WriteTo.Exceptionless(b => b.AddTags("Serilog Example"))
    .CreateLogger();

Copyright © 2017 Serilog Contributors - Provided under the Apache License, Version 2.0.

About

Writes events from Serilog to the Exceptionless logging service.

License:Apache License 2.0


Languages

Language:C# 100.0%