1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -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

@ -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<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;
}
IdentityModelEventSource.ShowPII = true;
loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Warning);
}
}
}

View File

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