From c25c17e5a1f3e27317dad6f32e9152e265431d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Tracewicz?= Date: Wed, 11 Sep 2024 21:42:00 +0200 Subject: [PATCH] Closes #60 TIDY: Move Log enricher into infrastructure project --- backend/src/api/Program.cs | 2 +- .../src/{api => infrastructure/Logging}/LoggingExtensions.cs | 3 ++- backend/src/infrastructure/infrastructure.csproj | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) rename backend/src/{api => infrastructure/Logging}/LoggingExtensions.cs (94%) diff --git a/backend/src/api/Program.cs b/backend/src/api/Program.cs index 4e0557e..eff56b6 100644 --- a/backend/src/api/Program.cs +++ b/backend/src/api/Program.cs @@ -4,7 +4,7 @@ using Microsoft.OpenApi.Models; using Serilog; using System.Security.Cryptography; -using api; +using infrastructure.Logging; using infrastructure.Data; using infrastructure.Keycloak; using core.Ports; diff --git a/backend/src/api/LoggingExtensions.cs b/backend/src/infrastructure/Logging/LoggingExtensions.cs similarity index 94% rename from backend/src/api/LoggingExtensions.cs rename to backend/src/infrastructure/Logging/LoggingExtensions.cs index a359a02..792c2f2 100644 --- a/backend/src/api/LoggingExtensions.cs +++ b/backend/src/infrastructure/Logging/LoggingExtensions.cs @@ -1,9 +1,10 @@ +using Microsoft.AspNetCore.Http; using Serilog; using Serilog.Configuration; using Serilog.Core; using Serilog.Events; -namespace api; +namespace infrastructure.Logging; public static class LoggingExtensions { diff --git a/backend/src/infrastructure/infrastructure.csproj b/backend/src/infrastructure/infrastructure.csproj index 7d93446..92b153b 100644 --- a/backend/src/infrastructure/infrastructure.csproj +++ b/backend/src/infrastructure/infrastructure.csproj @@ -13,6 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all +