skip to Main Content

How to configure ILoggerFactory in .NET 6 – Asp.net

In .NET 5 Startup.cs class there is Configure method which it's inside ILoggerFactory interface is injected. See below: public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } loggerFactory.AddFile("Logs/mylog-{Date}.txt"); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); .......... } In .NET…

VIEW QUESTION
Back To Top
Search