From 975cedad606f18279ec62be320a8829bbb8be20a Mon Sep 17 00:00:00 2001 From: samgibsonmoj Date: Fri, 31 May 2024 12:34:46 +0100 Subject: [PATCH] Remove duplicate sentry configuration and stop overriding --- src/Infrastructure/Extensions/SerilogExtensions.cs | 10 +--------- src/Server.UI/appsettings.json | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Infrastructure/Extensions/SerilogExtensions.cs b/src/Infrastructure/Extensions/SerilogExtensions.cs index 44bd4cf4..b3b7ab8a 100644 --- a/src/Infrastructure/Extensions/SerilogExtensions.cs +++ b/src/Infrastructure/Extensions/SerilogExtensions.cs @@ -1,4 +1,4 @@ -using System.Configuration; +using System.Configuration; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Configuration; using Serilog; @@ -14,14 +14,6 @@ public static void RegisterSerilog(this WebApplicationBuilder builder) { Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(builder.Configuration) - .WriteTo.Console() - .WriteTo.Sentry(options => - { - options.Dsn = builder.Configuration["Sentry:Dsn"]; - options.MinimumBreadcrumbLevel = LogEventLevel.Information; - options.MinimumEventLevel = LogEventLevel.Error; - options.SendDefaultPii = true; - }) .CreateLogger(); builder.Host.UseSerilog(); diff --git a/src/Server.UI/appsettings.json b/src/Server.UI/appsettings.json index bf54704b..2029dbbb 100644 --- a/src/Server.UI/appsettings.json +++ b/src/Server.UI/appsettings.json @@ -1,7 +1,4 @@ { - "Sentry": { - "Dsn": "" - }, "UseInMemoryDatabase": false, "DatabaseSettings": { "DbProvider": "mssql",