Skip to content

Unable to set filter for BetterStackLoggerProvider #3

@Jericho

Description

@Jericho

Microsoft.Extensions.Logging provides the following method: AddFilter<T>(...) where T : ILoggerProvider which allows developers to configure the logging level for a specific logging provider. For example, in the following code snippet I have configured the default log level to Debug and I was able to override this log level for the console to Information:

logging.AddFilter(logLevel => logLevel >= LogLevel.Debug);
logging.AddFilter<ConsoleLoggerProvider>(logLevel => logLevel >= LogLevel.Information);

Unfortunately I am unable to do the same for BetterStackLoggerProvider because this class is marked as internal. If this class was marked as public I would be able to write code like this:

logging.AddFilter<BetterStackLoggerProvider>(logLevel => logLevel >= LogLevel.Error);

I propose marking the BetterStackLoggerProvider as public and I will be happy to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions