mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
remove default logging
This commit is contained in:
parent
29311a007b
commit
6f88c1a3b4
2 changed files with 2 additions and 11 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using FilterLists.Services.Contracts;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace FilterLists.DataLoad
|
||||
{
|
||||
|
|
@ -14,11 +13,6 @@ public static void Main(string[] args)
|
|||
startup.ConfigureServices(services);
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
|
||||
//TODO: replace with serilog
|
||||
var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
|
||||
var logger = loggerFactory.CreateLogger<Program>();
|
||||
|
||||
logger.LogInformation("Updating Tables");
|
||||
var tableService = serviceProvider.GetService<ITableService>();
|
||||
tableService.UpdateTables();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
using System.IO;
|
||||
using FilterLists.Data.DependencyInjection.Extensions;
|
||||
using FilterLists.DataLoad.DependencyInjection.Extensions;
|
||||
using FilterLists.Services.DependencyInjection.Extensions;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace FilterLists.DataLoad
|
||||
{
|
||||
|
|
@ -21,12 +21,9 @@ public Startup()
|
|||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
var loggerFactory = new LoggerFactory().AddConsole().AddDebug();
|
||||
services.AddSingleton(loggerFactory);
|
||||
services.AddLogging();
|
||||
services.AddFilterListsRepositories(Configuration);
|
||||
services.AddFilterListsServices();
|
||||
//services.AddFilterListsDataLoad();
|
||||
services.AddFilterListsDataLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue