diff --git a/src/Miniblog.Core.csproj b/src/Miniblog.Core.csproj index c8ce56de..014550a2 100644 --- a/src/Miniblog.Core.csproj +++ b/src/Miniblog.Core.csproj @@ -1,16 +1,17 @@ - + - netcoreapp2.1 + netcoreapp2.2 + InProcess - + - + diff --git a/src/Startup.cs b/src/Startup.cs index c5eb4189..15d7a5d4 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -8,6 +8,8 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Console; using Miniblog.Core.Services; using WebEssentials.AspNetCore.OutputCaching; using WebMarkupMin.AspNetCore2; @@ -35,7 +37,7 @@ public static void Main(string[] args) public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseStartup() - .UseKestrel(a => a.AddServerHeader = false); + .ConfigureKestrel(a => a.AddServerHeader = false); public IConfiguration Configuration { get; } @@ -43,13 +45,16 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) => public void ConfigureServices(IServiceCollection services) { services.AddMvc() - .SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); services.AddSingleton(); services.AddSingleton(); services.Configure(Configuration.GetSection("blog")); services.TryAddSingleton(); services.AddMetaWeblog(); + services.AddLogging(builder => builder + .AddConsole() + .AddFilter(category: null, level: LogLevel.Information)); // Progressive Web Apps https://github.com/madskristensen/WebEssentials.AspNetCore.ServiceWorker services.AddProgressiveWebApp(new WebEssentials.AspNetCore.Pwa.PwaOptions