mthamil / AspNetCore.Serilog.RequestLoggingMiddleware

Middleware for ASP.NET Core that uses Serilog to log requests.
Apache License 2.0
8 stars 0 forks source link

Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'AspNetCore.Serilog.RequestLoggingMiddleware.SerilogRequestMiddleware' #3

Open arisliang opened 5 years ago

arisliang commented 5 years ago

Application startup exception: System.InvalidOperationException: Unable to resolve service for type 'Serilog.ILogger' while attempting to activate 'AspNetCore.Serilog.RequestLoggingMiddleware.SerilogRequestMiddleware'.

Anything we need to register for the middle to work?

mthamil commented 5 years ago

Thanks for the report, I'll take a look.

feanz commented 5 years ago

Was there any update on this I'm getting the same issue. I am using the latest preview build of .net core 3

AdimUser commented 5 years ago

Any update on this issue, I also getting the same error

feanz commented 5 years ago

I ended up just using Serilog.AspNetCore package there is a method in there that does the same thing now.

AdimUser commented 5 years ago

I ended up just using Serilog.AspNetCore package there is a method in there that does the same thing now.

Hi @feanz would you please share more details on your appoach