serilog-sinks-browserhttp
serilog-sinks-browserhttp copied to clipboard
Error : Received failed result NotFound when posting events to the server
I have created hosted blazorwasm project and trying to utilize serilog to view the log and events
I am getting the following Error
'2021-06-06T07:16:11.1970000Z Exception while emitting periodic batch from Serilog.Sinks.BrowserHttp.BrowserHttpSink:
Serilog.Debugging.LoggingFailedException: Received failed result NotFound when posting events to the server.\n at Serilog.Sinks.BrowserHttp.BrowserHttpSink.EmitBatchAsync(IEnumerable`1 events)\n
at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick()'
Here is my configuration code in blazor wasm client.
var levelSwitch = new LoggingLevelSwitch();
Log.Logger = new LoggerConfiguration()
.MinimumLevel.ControlledBy(levelSwitch)
.Enrich.FromLogContext()
.WriteTo.BrowserHttp($"{builder.HostEnvironment.BaseAddress}ingest", controlLevelSwitch: levelSwitch)
.CreateLogger();
Also when i navigate to https://localhost:5001/ingest, it shows blank web page.