Skip to content

Broken app startup when Overriding Microsoft logs #139

@4wakened5leeper

Description

@4wakened5leeper

I have a strange behaviour when I start a new Asp .Net Core project in VS2019, with Docker support on Linux. I add the support of docker-compose, and update the default program.cs with the one in the EarlyInitializationSample. (With Serilog.AspNetCore 3.0 nuget package)
I start the app, everything works fine, it launches my browser on the WeatherForecastController (the demo controller from the Visual Studio template).

If I add a filter in the logger configuration (.MinimumLevel.Override("System", LogEventLevel.Warning)), it still works as expected.

BUT ! If I replace System by Microsoft (.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)), the application start, but seems to stop loading stuff in the middle of the startup process, and it doesn't launch my browser.

My app seems to respond normally, but I fear it could hide something wierd...

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