From 9e470c1f7a71b80f32c96a9dc63e52bba6ac2e35 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 27 Nov 2019 14:42:24 -0500 Subject: [PATCH] log startup --- src/Api/Startup.cs | 6 +++++- src/Identity/Startup.cs | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs index fcac01aec2..ddc13992a6 100644 --- a/src/Api/Startup.cs +++ b/src/Api/Startup.cs @@ -140,7 +140,8 @@ namespace Bit.Api IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime appLifetime, - GlobalSettings globalSettings) + GlobalSettings globalSettings, + ILogger logger) { IdentityModelEventSource.ShowPII = true; app.UseSerilog(env, appLifetime, globalSettings); @@ -194,6 +195,9 @@ namespace Bit.Api config.OAuthClientSecret("secretKey"); }); } + + // Log startup + logger.LogInformation(Constants.BypassFiltersEventId, globalSettings.ProjectName + " started."); } } } diff --git a/src/Identity/Startup.cs b/src/Identity/Startup.cs index a7449e1792..c4d513893b 100644 --- a/src/Identity/Startup.cs +++ b/src/Identity/Startup.cs @@ -7,6 +7,7 @@ using Bit.Core; using Bit.Core.Utilities; using AspNetCoreRateLimit; using System.Globalization; +using Microsoft.Extensions.Logging; namespace Bit.Identity { @@ -75,7 +76,8 @@ namespace Bit.Identity IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime appLifetime, - GlobalSettings globalSettings) + GlobalSettings globalSettings, + ILogger logger) { app.UseSerilog(env, appLifetime, globalSettings); @@ -97,6 +99,9 @@ namespace Bit.Identity // Add IdentityServer to the request pipeline. app.UseIdentityServer(); + + // Log startup + logger.LogInformation(Constants.BypassFiltersEventId, globalSettings.ProjectName + " started."); } } }