diff --git a/src/Admin/Views/Logs/Index.cshtml b/src/Admin/Views/Logs/Index.cshtml index ae14cfcecf..02a80d9967 100644 --- a/src/Admin/Views/Logs/Index.cshtml +++ b/src/Admin/Views/Logs/Index.cshtml @@ -20,6 +20,7 @@ + diff --git a/src/EventsProcessor/Startup.cs b/src/EventsProcessor/Startup.cs index b258edf71f..97e2d7d318 100644 --- a/src/EventsProcessor/Startup.cs +++ b/src/EventsProcessor/Startup.cs @@ -1,9 +1,13 @@ using System.Globalization; +using Bit.Core; +using Bit.Core.Utilities; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Microsoft.IdentityModel.Logging; +using Serilog.Events; namespace Bit.EventsProcessor { @@ -25,12 +29,15 @@ namespace Bit.EventsProcessor services.AddHostedService(); } - public void Configure(IApplicationBuilder app, IHostingEnvironment env) + public void Configure( + IApplicationBuilder app, + IHostingEnvironment env, + ILoggerFactory loggerFactory, + IApplicationLifetime appLifetime, + GlobalSettings globalSettings) { - if(env.IsDevelopment()) - { - IdentityModelEventSource.ShowPII = true; - } + IdentityModelEventSource.ShowPII = true; + loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Warning); } } } diff --git a/src/EventsProcessor/appsettings.json b/src/EventsProcessor/appsettings.json index a5abe9f788..af0ca259fa 100644 --- a/src/EventsProcessor/appsettings.json +++ b/src/EventsProcessor/appsettings.json @@ -1,3 +1,11 @@ { - "azureStorageConnectionString": "SECRET" + "azureStorageConnectionString": "SECRET", + "globalSettings": { + "selfHosted": false, + "projectName": "Events Processor", + "documentDb": { + "uri": "SECRET", + "key": "SECRET" + } + } } diff --git a/src/Notifications/Startup.cs b/src/Notifications/Startup.cs index 1d27439f67..30f4ed94de 100644 --- a/src/Notifications/Startup.cs +++ b/src/Notifications/Startup.cs @@ -102,7 +102,7 @@ namespace Bit.Notifications return false; } - return e.Level >= LogEventLevel.Error; + return e.Level >= LogEventLevel.Warning; }); if(env.IsDevelopment())