-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
.NETPull requests that update .net codePull requests that update .net code
Description
Description
Serilog supports per sink minimum levels for logs.
We have a extension method that we encourage people to use, which configures a Sentry sink for Serilog, but it does not let SDK users specify this argument (which would need to be passed on here):
| return loggerConfiguration.Sink(new SentrySink(options, sdkDisposable)); |
The only way to configure that currently is by using configuration bindings (e.g. appsettings.json)... probably OK for ASP.NET Core users... bit of a pain for MAUI users though.
NOTE
It is still possible to configure a "global" minimum level for structured logs in code... just not per sink levels. For example:
sentry-dotnet/samples/Sentry.Samples.AspNetCore.Serilog/Program.cs
Lines 12 to 15 in 5f6e7b4
| var builder = WebApplication.CreateBuilder(args); | |
| builder.Host.UseSerilog((_, c) => | |
| c.Enrich.FromLogContext() | |
| .MinimumLevel.Debug() |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETPull requests that update .net codePull requests that update .net code