Skip to content

Serilog LoggingLevelSwitch  #2150

@sapsari

Description

@sapsari

Problem Statement

Due to current API design, we cannot add a Serilog level switch to Sentry sink.

I want something like this:

const Serilog.Events.LogEventLevel sentryMinLevel = Serilog.Events.LogEventLevel.Warning;
static LoggingLevelSwitch sentryLevelSwitch;

var config = new LoggerConfiguration().MinimumLevel.Debug();

config = config.WriteTo.Sink(_sentrySink, sentryMinLevel, sentryLevelSwitch);

Either make class SentrySink public or add an additional argument (of type LoggingLevelSwitch ) to the extension methods.

Solution Brainstorm

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status
    No status
    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions