From 4173c3d96a60acc2a41d0a2b9ff52ad04aa4a12f Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 8 Apr 2025 10:50:49 +0200 Subject: [PATCH 1/6] Aktualisierung der Ocelot-Paketversion in der Projektdatei MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Projektdatei `DigitalData.Gateway.csproj` wurde geändert, um das `Ocelot`-Paket von Version `22.0.1` auf `23.4.3` zu aktualisieren. Außerdem wurde eine kleine Formatierungsänderung am ``-Tag vorgenommen, der nun ein nicht sichtbares Zeichen am Anfang der Zeile enthält. --- DigitalData.Gateway.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DigitalData.Gateway.csproj b/DigitalData.Gateway.csproj index 4540eb7..d0affd8 100644 --- a/DigitalData.Gateway.csproj +++ b/DigitalData.Gateway.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -13,7 +13,7 @@ - + From 72b1c58b72e481a754ff163e72afd3682dd03d8b Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 8 Apr 2025 10:53:23 +0200 Subject: [PATCH 2/6] chore: Aktualisierung der Ziel-Frameworks in der Projektdatei MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Geänderte `DigitalData.Gateway.csproj` zur Unterstützung mehrerer Ziel-Frameworks: `net7.0`, `net8.0` und `net9.0`. Diese verbessert die Kompatibilität und Flexibilität des Projekts. --- DigitalData.Gateway.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DigitalData.Gateway.csproj b/DigitalData.Gateway.csproj index d0affd8..f12ad2f 100644 --- a/DigitalData.Gateway.csproj +++ b/DigitalData.Gateway.csproj @@ -1,7 +1,7 @@  - net7.0 + net7.0;net8.0;net9.0 enable enable 1.0.0 From 23d73e0671b597f6242a9947d1b1246075acb8e4 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 8 Apr 2025 15:29:26 +0200 Subject: [PATCH 3/6] gitignore aktualisiert --- .../IISProfileNet9Win64.pubxml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Properties/PublishProfiles/IISProfileNet9Win64.pubxml diff --git a/Properties/PublishProfiles/IISProfileNet9Win64.pubxml b/Properties/PublishProfiles/IISProfileNet9Win64.pubxml new file mode 100644 index 0000000..0052400 --- /dev/null +++ b/Properties/PublishProfiles/IISProfileNet9Win64.pubxml @@ -0,0 +1,22 @@ + + + + + Package + Release + Any CPU + + true + false + 329f45bf-4c79-4a7b-9086-d6205617aa42 + P:\Install .Net\0 DD - Smart UP\Gateway\WorkFlow\\.zip + true + Gateway + <_TargetId>IISWebDeployPackage + net9.0 + win-x64 + false + + \ No newline at end of file From 23e73aae19bc0ce59a5ca449074130294cdb0c34 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Tue, 8 Apr 2025 15:30:21 +0200 Subject: [PATCH 4/6] IISProfile aktualisieren --- .config/dotnet-tools.json | 13 +++++++++++++ Properties/PublishProfiles/IISProfile.pubxml | 19 ------------------- 2 files changed, 13 insertions(+), 19 deletions(-) create mode 100644 .config/dotnet-tools.json delete mode 100644 Properties/PublishProfiles/IISProfile.pubxml diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000..0280531 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "9.0.3", + "commands": [ + "dotnet-ef" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/Properties/PublishProfiles/IISProfile.pubxml b/Properties/PublishProfiles/IISProfile.pubxml deleted file mode 100644 index 586b025..0000000 --- a/Properties/PublishProfiles/IISProfile.pubxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Package - Release - Any CPU - - true - false - 329f45bf-4c79-4a7b-9086-d6205617aa42 - P:\Install .Net\0 DD - Smart UP\Gateway\WorkFlow\$(Version)\$(Version).zip - true - Gateway - <_TargetId>IISWebDeployPackage - - \ No newline at end of file From 6ade388cd72a9368455d3cad5116707cc8bff4ad Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 9 May 2025 23:20:27 +0200 Subject: [PATCH 5/6] Enhance logging configuration in Program.cs Initialized logging by clearing providers, setting minimum level to Trace, and configuring NLog as the logging provider. --- Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Program.cs b/Program.cs index 7616c49..a527042 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,10 @@ try { var builder = WebApplication.CreateBuilder(args); + builder.Logging.ClearProviders(); + builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); + builder.Host.UseNLog(); + // Make sure to add the Ocelot configuration file var suffix = builder.Environment.IsDevelopment() ? ".Development" : ""; builder.Configuration.AddJsonFile($"ocelot{suffix}.json"); From 5843e9efa8c6677daa29ee086f3de5bda378754e Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 22 Jul 2025 18:08:52 +0200 Subject: [PATCH 6/6] feat(logging): enable NLog only in non-development environments --- Program.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Program.cs b/Program.cs index a527042..391d106 100644 --- a/Program.cs +++ b/Program.cs @@ -9,10 +9,14 @@ logger.Info("Logging initialized."); try { var builder = WebApplication.CreateBuilder(args); - - builder.Logging.ClearProviders(); + builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); - builder.Host.UseNLog(); + + if (!builder.Environment.IsDevelopment()) + { + builder.Logging.ClearProviders(); + builder.Host.UseNLog(); + } // Make sure to add the Ocelot configuration file var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";