VOOZH about

URL: https://www.nuget.org/packages/Serilog.Sinks.Raygun/

⇱ NuGet Gallery | Serilog.Sinks.Raygun 8.2.0




👁 Image
Serilog.Sinks.Raygun 8.2.0

dotnet add package Serilog.Sinks.Raygun --version 8.2.0
 
 
NuGet\Install-Package Serilog.Sinks.Raygun -Version 8.2.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Serilog.Sinks.Raygun" Version="8.2.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Serilog.Sinks.Raygun" Version="8.2.0" />
 
Directory.Packages.props
<PackageReference Include="Serilog.Sinks.Raygun" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Serilog.Sinks.Raygun --version 8.2.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Serilog.Sinks.Raygun, 8.2.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Serilog.Sinks.Raygun@8.2.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Serilog.Sinks.Raygun&version=8.2.0
 
Install as a Cake Addin
#tool nuget:?package=Serilog.Sinks.Raygun&version=8.2.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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 .

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 net5.0 is compatible.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 is compatible.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 is compatible.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.0 159,990 2/12/2025
8.2.0-pre-1 216 2/12/2025
8.1.0-pre-1 1,583 1/2/2025
8.0.0 162,683 8/25/2024
7.6.0-pre-1 366 8/13/2024
7.5.0 139,960 2/12/2024
7.5.0-pre-1 239 2/1/2024
7.4.0 99,549 1/22/2024
7.4.0-pre-1 245 1/17/2024
7.3.0 87,818 11/14/2023
7.3.0-pre-2 276 11/10/2023
7.3.0-pre-1 268 11/10/2023
7.2.0-pre-1 284 10/25/2023
7.1.0 91,428 10/9/2023
7.0.0 74,820 9/21/2023
7.0.0-pre-2 303 9/20/2023
7.0.0-pre-1 274 9/15/2023
5.3.3 180,113 6/15/2023
5.3.1 95,089 5/18/2023
5.3.0 75,975 4/28/2023
Loading failed