Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Override in MinimumLevel #32

Closed
afonsoft opened this issue Mar 4, 2024 · 1 comment
Closed

Create a Override in MinimumLevel #32

afonsoft opened this issue Mar 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@afonsoft
Copy link

afonsoft commented Mar 4, 2024

Create a Override in MinimumLevel like Serilog

image

services.AddLogging(configure =>
{
    configure.ClearProviders();
    configure.AddSpectreConsole(options =>
    {
        options.SetMinimumLevel(LogLevel.Information);
        options.MinimumLevel.Override("Microsoft", LogEventLevel.Error);
        options.MinimumLevel.Override("System", LogEventLevel.Error);
        options.MinimumLevel.Override("System.Net.Http.HttpClient", LogEventLevel.Warning);
        options.UseSerilogConsoleStyle();
    });
    configure.AddSerilog(Log.Logger, true);
}
@daningalla daningalla added the enhancement New feature or request label Mar 9, 2024
@daningalla daningalla self-assigned this Mar 9, 2024
daningalla added a commit that referenced this issue Mar 9, 2024
@daningalla
Copy link
Contributor

Dev release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants