mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
tweaks to Startup
per Scott Allen's suggestions
This commit is contained in:
parent
304aede29f
commit
7d4436bfc8
1 changed files with 6 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ namespace FilterLists.Api
|
|||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IHostingEnvironment env)
|
||||
public Startup(IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(env.ContentRootPath)
|
||||
|
|
@ -19,6 +19,10 @@ public Startup(IHostingEnvironment env)
|
|||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true)
|
||||
.AddEnvironmentVariables();
|
||||
Configuration = builder.Build();
|
||||
|
||||
//TODO: replace below with serilog
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
}
|
||||
|
||||
public IConfigurationRoot Configuration { get; }
|
||||
|
|
@ -30,10 +34,8 @@ public void ConfigureServices(IServiceCollection services)
|
|||
services.AddFilterListsApi();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue