diff --git a/src/Admin/Views/Logs/Index.cshtml b/src/Admin/Views/Logs/Index.cshtml index cc22a44f04..a6cbfcfa5f 100644 --- a/src/Admin/Views/Logs/Index.cshtml +++ b/src/Admin/Views/Logs/Index.cshtml @@ -22,6 +22,7 @@ + diff --git a/src/Icons/Icons.csproj b/src/Icons/Icons.csproj index bcfbf8e617..621f92337a 100644 --- a/src/Icons/Icons.csproj +++ b/src/Icons/Icons.csproj @@ -22,4 +22,8 @@ + + + + diff --git a/src/Icons/Startup.cs b/src/Icons/Startup.cs index 9310bbfe6a..cdd52fa0c1 100644 --- a/src/Icons/Startup.cs +++ b/src/Icons/Startup.cs @@ -1,11 +1,15 @@ using System; +using Bit.Core; +using Bit.Core.Utilities; using Bit.Icons.Services; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Microsoft.Net.Http.Headers; +using Serilog.Events; namespace Bit.Icons { @@ -24,6 +28,7 @@ namespace Bit.Icons services.AddOptions(); // Settings + var globalSettings = services.AddGlobalSettingsServices(Configuration); var iconsSettings = new IconsSettings(); ConfigurationBinder.Bind(Configuration.GetSection("IconsSettings"), iconsSettings); services.AddSingleton(s => iconsSettings); @@ -44,8 +49,13 @@ namespace Bit.Icons public void Configure( IApplicationBuilder app, - IHostingEnvironment env) + IHostingEnvironment env, + ILoggerFactory loggerFactory, + IApplicationLifetime appLifetime, + GlobalSettings globalSettings) { + loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error); + if(env.IsDevelopment()) { app.UseDeveloperExceptionPage(); diff --git a/src/Icons/appsettings.json b/src/Icons/appsettings.json index cf5e1e7493..65267ef4e9 100644 --- a/src/Icons/appsettings.json +++ b/src/Icons/appsettings.json @@ -1,15 +1,9 @@ { - "Logging": { - "IncludeScopes": false, - "Debug": { - "LogLevel": { - "Default": "Warning" - } - }, - "Console": { - "LogLevel": { - "Default": "Warning" - } + "globalSettings": { + "projectName": "Icons", + "documentDb": { + "uri": "SECRET", + "key": "SECRET" } }, "iconsSettings": {