Open krzysiek-b opened 5 months ago
Someone somewhere is going to have to analyze more deeply to repro.
A bug
is a set of steps and/or failing test that replicates a validated problem that needs a code change to fix...
You'll find the serilog
tag on stack overflow is a better way to to/fro on troubleshooting/narrowing down issues like this, as there's no herd of highly paid Serilog maintainers at a loose end, swarming around looking for things to attempt to repro any reported problems...
builder.Host.UseSerilog()
registers Serilog as the logger factory (complete logging pipeline). But, Aspire configures its default logging settings via Microsoft.Extensions.Logging's (the other logging pipeline implementation, which UseSerilog()
replaces).
The two options are:
builder.Logging.AddSerilog()
; builder.Logging
is MEL's configuration entry point, wiring things up this way will slot Serilog in under MEL, routing MEL events to it. The downside is that you'll have two logging pipelines running, and if you write to Serilog's APIs directly, the events won't reach other MEL providers.WriteTo.OpenTelemetry()
to point to the Aspire dashboard. You'll need to dig around a bit to find the right endpoint URL/protocol, but should be doable.Keen to hear how you go; hope this helps!
Description Looks like currently when using
in ASP.NET app using .NET 8 Serilog breaks .NET Aspire logging integration. The structured logs tab is empty.
Expected behavior Structured logs tab should have all logs.