serilog-sinks-browserhttp icon indicating copy to clipboard operation
serilog-sinks-browserhttp copied to clipboard

Error : Received failed result NotFound when posting events to the server

Open nssidhu opened this issue 4 years ago • 3 comments

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.

nssidhu avatar Jun 06 '21 07:06 nssidhu

Hi @nssidhu - are you running something like Serilog.AspNetCore.Ingestion on the server-side?

nblumhardt avatar Jun 06 '21 23:06 nblumhardt

Yes

Sent from Yahoo Mail for iPhone

On Sunday, June 6, 2021, 6:12 PM, Nicholas Blumhardt @.***> wrote:

Hi @nssidhu - are you running something like Serilog.AspNetCore.Ingestion on the server-side?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nssidhu avatar Jun 07 '21 00:06 nssidhu

Hmm :thinking: - no ideas then, sorry. Checking the browser's network tab for the failing request might shed some light on it. Good luck!

nblumhardt avatar Jun 07 '21 06:06 nblumhardt