Skip to content

Using .UseSerilog() on WebApplicationbuilder.Host disables the auto rendering/opening of the page on startup #397

@BatorSzabo

Description

@BatorSzabo

Description
when using the .UseSerilog() on my WebApplicationBuilder the page no longer renders after I run my project. It does not stops it from running I can still access the page via Url.

Reproduction

//Configure Logger
var builder = WebApplication.CreateBuilder(args);
Log.Logger = new LoggerConfiguration()
.WriteTo
.Async(x =>
x.File(LogsUtils.GetLogFilePath(), rollingInterval: RollingInterval.Day))
.CreateLogger();

builder.Host.UseSerilog(); //this disables auto start of the webpage
Expected behavior
home page opens in webbrowser after building is complete

Relevant package, tooling and runtime versions
What Serilog version are you using, on what platform?

I use Serilog 4.3.0
on a Blazor Server Application

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions