Serilog.Sinks.Raygun
8.0.0
dotnet add package Serilog.Sinks.Raygun --version 8.0.0
NuGet\Install-Package Serilog.Sinks.Raygun -Version 8.0.0
<PackageReference Include="Serilog.Sinks.Raygun" Version="8.0.0" />
paket add Serilog.Sinks.Raygun --version 8.0.0
#r "nuget: Serilog.Sinks.Raygun, 8.0.0"
// Install Serilog.Sinks.Raygun as a Cake Addin #addin nuget:?package=Serilog.Sinks.Raygun&version=8.0.0 // Install Serilog.Sinks.Raygun as a Cake Tool #tool nuget:?package=Serilog.Sinks.Raygun&version=8.0.0
serilog-sinks-raygun
Serilog Sinks error and performance monitoring with Raygun is available using the serilog-sinks-raygun provider.
serilog-sinks-raygun is a library that you can easily add to your website or web application, which will then monitor your application and display all Serilog errors and issues affecting your users within your Raygun account. Installation is painless.
The provider is a single package (Serilog.Sinks.Raygun) which includes the sole dependency (Serilog), allowing you to drop it straight in.
Getting started
Step 1 - Add packages
Install the Serilog (if not included already) and Serilog.Sinks.Raygun package into your project. You can either use the below dotnet CLI command, or the NuGet management GUI in the IDE you use.
dotnet add package Serilog
dotnet add package Serilog.Sinks.Raygun
Step 2 - Initialization
The following examples are for .NET 6.0+ applications. For other frameworks, please refer to the .NET Framework Readme.
Example of setup for ASP.NET Applications:
using Mindscape.Raygun4Net.AspNetCore;
using Serilog;
var builder = WebApplication.CreateBuilder(args);
// Add Raygun
builder.Services.AddRaygun(builder.Configuration);
builder.Services.AddRaygunUserProvider();
builder.Host.UseSerilog((context, provider, config) =>
{
// Add the Raygun sink
config.WriteTo.Raygun(raygunClient: provider.GetRequiredService<RaygunClient>());
});
Example of setup for Console/Service:
using Mindscape.Raygun4Net;
using Serilog;
using Serilog.Sinks.Raygun.Extensions;
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices((context, services) =>
{
// Add Raygun
services.AddRaygun(context.Configuration);
services.AddHostedService<Worker>();
})
.UseSerilog((_, serviceProvider, config) =>
{
// Add the Raygun sink
config.WriteTo.Raygun(raygunClient: serviceProvider.GetRequiredService<RaygunClient>());
})
.Build();
await host.RunAsync();
Example of setup for MAUI:
using Serilog;
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
// Add Raygun
.AddRaygun();
var app = builder.Build();
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
// Add the Raygun sink
.WriteTo.Raygun(raygunClient: app.Services.GetRequiredService<RaygunMauiClient>())
.CreateLogger();
return app;
Configuration Properties
raygunClient
type: RaygunClientBase
required
This property is required for the Raygun Sink to function. The client can be any implementation that inherits from RaygunClientBase, this could be the Raygun4Maui client, Raygun4Net.AspNetCore client, or Raygun4Net.NetCore client. Ideally, this is resolved from the ServiceCollection in .NET Core applications.
formatProvider
type: IFormatProvider
default: null
This property supplies culture-specific formatting information. By default, it is null.
restrictedToMinimumLevel
type: LogEventLevel
default: LogEventLevel.Error
You can set the minimum log event level required in order to write an event to the sink. By default, this is set to Error as Raygun is mostly used for error reporting.
Enrich with HTTP request and response data
Properties included from other Serilog Enrichers should automatically be included into the Raygun errors.
To use the old Raygun Enricher you can follow the Enricher Readme to add the enricher to your project.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.NETFramework.ReferenceAssemblies.net462 (>= 1.0.3)
- Mindscape.Raygun4Net (>= 11.1.0)
- Serilog (>= 2.12.0)
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 1.1.2)
- Mindscape.Raygun4Net.NetCore (>= 11.1.0)
- Serilog (>= 2.12.0)
-
net5.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 1.1.2)
- Mindscape.Raygun4Net.NetCore (>= 11.1.0)
- Serilog (>= 2.12.0)
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 1.1.2)
- Mindscape.Raygun4Net.NetCore (>= 11.1.0)
- Serilog (>= 2.12.0)
-
net7.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 1.1.2)
- Mindscape.Raygun4Net.NetCore (>= 11.1.0)
- Serilog (>= 2.12.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Serilog.Sinks.Raygun:
Package | Downloads |
---|---|
UniLogger
Logger for MVC and Core applications |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.0 | 7,528 | 8/25/2024 |
7.6.0-pre-1 | 229 | 8/13/2024 |
7.5.0 | 32,132 | 2/12/2024 |
7.5.0-pre-1 | 109 | 2/1/2024 |
7.4.0 | 18,635 | 1/22/2024 |
7.4.0-pre-1 | 111 | 1/17/2024 |
7.3.0 | 9,648 | 11/14/2023 |
7.3.0-pre-2 | 146 | 11/10/2023 |
7.3.0-pre-1 | 147 | 11/10/2023 |
7.2.0-pre-1 | 150 | 10/25/2023 |
7.1.0 | 7,539 | 10/9/2023 |
7.0.0 | 636 | 9/21/2023 |
7.0.0-pre-2 | 161 | 9/20/2023 |
7.0.0-pre-1 | 129 | 9/15/2023 |
5.3.3 | 33,652 | 6/15/2023 |
5.3.1 | 20,021 | 5/18/2023 |
5.3.0 | 1,655 | 4/28/2023 |
5.2.0 | 2,007 | 3/29/2023 |
5.1.1 | 137,338 | 3/3/2022 |
5.1.1-dev-00108 | 203 | 3/3/2022 |
5.1.1-dev-00107 | 190 | 3/3/2022 |
5.1.0 | 1,964 | 2/4/2022 |
5.1.0-dev-00102 | 186 | 2/4/2022 |
5.0.3-dev-00101 | 191 | 2/4/2022 |
5.0.3-dev-00097 | 192 | 1/16/2022 |
5.0.3-dev-00089 | 359 | 6/22/2021 |
5.0.2 | 406,882 | 6/21/2021 |
5.0.2-dev-00086 | 269 | 6/21/2021 |
5.0.2-dev-00083 | 314 | 6/21/2021 |
5.0.1 | 443,194 | 10/26/2020 |
5.0.1-dev-00074 | 420 | 10/26/2020 |
5.0.0 | 646 | 10/26/2020 |
4.0.1-dev-00070 | 388 | 10/26/2020 |
4.0.1-dev-00056 | 419 | 10/1/2020 |
4.0.1-dev-00048 | 405 | 9/1/2020 |
4.0.1-dev-00045 | 414 | 8/16/2020 |
4.0.1-dev-00040 | 365 | 8/10/2020 |
4.0.1-dev-00039 | 383 | 8/10/2020 |
4.0.1-dev-00038 | 371 | 8/10/2020 |
4.0.0 | 293,067 | 2/18/2020 |
4.0.0-dev-00029 | 5,335 | 7/16/2019 |
3.0.1-dev-00026 | 28,722 | 9/5/2018 |
3.0.1-dev-00024 | 1,204 | 7/13/2018 |
3.0.1-dev-00022 | 829 | 5/9/2018 |
3.0.1-dev-00021 | 3,957 | 4/30/2018 |
3.0.0 | 723,861 | 12/6/2017 |
2.0.15 | 37,656 | 5/22/2017 |
2.0.13 | 15,012 | 1/12/2017 |
1.5.10 | 10,782 | 9/30/2016 |
1.5.8 | 17,662 | 12/16/2015 |
1.5.6 | 4,127 | 5/14/2015 |
1.5.3 | 1,714 | 4/1/2015 |
1.5.2 | 1,205 | 3/30/2015 |
1.5.1 | 1,169 | 3/27/2015 |
1.4.196 | 1,678 | 2/22/2015 |
1.4.182 | 1,444 | 2/15/2015 |
1.4.168 | 1,299 | 2/8/2015 |
1.4.155 | 1,152 | 2/1/2015 |
1.4.139 | 1,210 | 1/23/2015 |
1.4.118 | 1,213 | 1/13/2015 |
1.4.113 | 1,139 | 1/6/2015 |
1.4.102 | 1,480 | 12/21/2014 |
1.4.99 | 2,005 | 12/18/2014 |
1.4.97 | 1,478 | 12/18/2014 |
1.4.76 | 1,406 | 12/8/2014 |
1.4.39 | 1,741 | 11/26/2014 |
1.4.34 | 1,337 | 11/24/2014 |
1.4.28 | 1,300 | 11/24/2014 |
1.4.27 | 1,327 | 11/23/2014 |
1.4.23 | 1,388 | 11/21/2014 |
1.4.21 | 1,319 | 11/21/2014 |
1.4.18 | 1,543 | 11/18/2014 |
1.4.15 | 2,234 | 11/4/2014 |
1.4.14 | 1,235 | 10/23/2014 |
1.4.13 | 1,157 | 10/23/2014 |
1.4.12 | 1,231 | 10/12/2014 |
1.4.11 | 1,206 | 10/8/2014 |
1.4.10 | 1,174 | 9/26/2014 |
1.4.9 | 1,189 | 9/17/2014 |
1.4.8 | 1,156 | 9/11/2014 |
1.4.7 | 1,181 | 9/1/2014 |
1.4.6 | 1,135 | 8/31/2014 |
1.4.5 | 1,171 | 8/27/2014 |
1.4.4 | 1,212 | 8/27/2014 |
1.4.3 | 1,257 | 8/25/2014 |
1.4.2 | 1,215 | 8/23/2014 |
1.4.1 | 1,193 | 8/23/2014 |
1.3.43 | 1,273 | 8/4/2014 |
1.3.42 | 1,165 | 7/30/2014 |
1.3.41 | 1,159 | 7/28/2014 |
1.3.40 | 1,148 | 7/26/2014 |
1.3.39 | 1,194 | 7/25/2014 |
1.3.36 | 1,177 | 7/20/2014 |
1.3.35 | 1,173 | 7/17/2014 |
1.3.34 | 1,191 | 7/6/2014 |
1.3.33 | 1,198 | 6/30/2014 |
1.3.30 | 1,220 | 6/19/2014 |
1.3.29 | 1,251 | 6/19/2014 |
1.3.28 | 1,194 | 6/19/2014 |
1.3.27 | 1,157 | 6/18/2014 |
1.3.25 | 1,226 | 6/9/2014 |
1.3.24 | 1,217 | 5/21/2014 |
1.3.23 | 1,178 | 5/20/2014 |
1.3.20 | 1,220 | 5/18/2014 |
1.3.19 | 1,260 | 5/17/2014 |
1.3.18 | 1,208 | 5/17/2014 |
1.3.17 | 1,335 | 5/17/2014 |
1.3.16 | 1,170 | 5/17/2014 |
1.3.15 | 1,200 | 5/16/2014 |
1.3.14 | 1,207 | 5/16/2014 |
1.3.13 | 1,240 | 5/16/2014 |
1.3.12 | 1,214 | 5/14/2014 |