public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDBLogging((category, level) => { if (level >= LogLevel.Information) { return(true); } return(false); }); app.UseHttpsRedirection(); app.UseMvc(); }