Skip to content

dnoakes/serilog-sinks-exceptionless

 
 

Repository files navigation

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 © 2023 Serilog Contributors - Provided under the Apache License, Version 2.0.

About

Writes events from Serilog to the Exceptionless logging service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%