1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 21:48:12 -05:00

more logging

This commit is contained in:
Kyle Spearrin 2019-07-11 16:19:38 -04:00
parent 21d5417e92
commit a6bd55e7a5
4 changed files with 23 additions and 7 deletions

View File

@ -20,6 +20,7 @@
<option asp-selected="@(Model.Project == "Api")" value="Api">Api</option> <option asp-selected="@(Model.Project == "Api")" value="Api">Api</option>
<option asp-selected="@(Model.Project == "Billing")" value="Billing">Billing</option> <option asp-selected="@(Model.Project == "Billing")" value="Billing">Billing</option>
<option asp-selected="@(Model.Project == "Events")" value="Events">Events</option> <option asp-selected="@(Model.Project == "Events")" value="Events">Events</option>
<option asp-selected="@(Model.Project == "Events Processor")" value="Events Processor">Events Processor</option>
<option asp-selected="@(Model.Project == "Identity")" value="Identity">Identity</option> <option asp-selected="@(Model.Project == "Identity")" value="Identity">Identity</option>
<option asp-selected="@(Model.Project == "Notifications")" value="Notifications">Notifications</option> <option asp-selected="@(Model.Project == "Notifications")" value="Notifications">Notifications</option>
<option asp-selected="@(Model.Project == "Icons")" value="Icons">Icons</option> <option asp-selected="@(Model.Project == "Icons")" value="Icons">Icons</option>

View File

@ -1,9 +1,13 @@
using System.Globalization; using System.Globalization;
using Bit.Core;
using Bit.Core.Utilities;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Logging;
using Serilog.Events;
namespace Bit.EventsProcessor namespace Bit.EventsProcessor
{ {
@ -25,12 +29,15 @@ namespace Bit.EventsProcessor
services.AddHostedService<AzureQueueHostedService>(); services.AddHostedService<AzureQueueHostedService>();
} }
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;
{ loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Warning);
IdentityModelEventSource.ShowPII = true;
}
} }
} }
} }

View File

@ -1,3 +1,11 @@
{ {
"azureStorageConnectionString": "SECRET" "azureStorageConnectionString": "SECRET",
"globalSettings": {
"selfHosted": false,
"projectName": "Events Processor",
"documentDb": {
"uri": "SECRET",
"key": "SECRET"
}
}
} }

View File

@ -102,7 +102,7 @@ namespace Bit.Notifications
return false; return false;
} }
return e.Level >= LogEventLevel.Error; return e.Level >= LogEventLevel.Warning;
}); });
if(env.IsDevelopment()) if(env.IsDevelopment())