5 Commits

Author SHA1 Message Date
Developer 02
941e47ba3e Update logging configuration in Program.cs
Modified logging setup to use NLog only in non-development environments, while maintaining trace-level logging for development.
2025-05-11 11:14:19 +02:00
Developer 02
a76afdda34 Bump version to 1.2.0 in project file
Updated the `DigitalData.Gateway.csproj` to reflect
new versioning information, changing `Version`,
`AssemblyVersion`, and `FileVersion` from `1.1.0` to `1.2.0`.
2025-05-11 10:51:16 +02:00
Developer 02
0d0e4675ad Merge branch 'master' into feat/envelope-generator.gen.api 2025-05-09 23:21:28 +02:00
Developer 02
6ade388cd7 Enhance logging configuration in Program.cs
Initialized logging by clearing providers, setting minimum
level to Trace, and configuring NLog as the logging provider.
2025-05-09 23:20:27 +02:00
Developer 02
5f21002e4f Update port configuration in ocelot.Development.json
Changed the `Port` number for `DownstreamHostAndPorts` from `7174` to `8088` across multiple route definitions. Updated `DownstreamPathTemplate` and `UpstreamPathTemplate` for paths including `/swagger/{route}`, `/scalar`, and `/api/{route}`. Corrected the `UpstreamPathTemplate` for `/api/{route}/{id}` by removing an unnecessary slash before `{id}`.
2025-05-09 23:19:23 +02:00
3 changed files with 18 additions and 10 deletions

View File

@@ -4,9 +4,9 @@
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks> <TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Version>1.1.0</Version> <Version>1.2.0</Version>
<AssemblyVersion>1.1.0</AssemblyVersion> <AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion> <FileVersion>1.2.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -10,6 +10,14 @@ try
{ {
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
if (!builder.Environment.IsDevelopment())
{
builder.Logging.ClearProviders();
builder.Host.UseNLog();
}
// Make sure to add the Ocelot configuration file // Make sure to add the Ocelot configuration file
var suffix = builder.Environment.IsDevelopment() ? ".Development" : ""; var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";
builder.Configuration.AddJsonFile($"ocelot{suffix}.json"); builder.Configuration.AddJsonFile($"ocelot{suffix}.json");

View File

@@ -6,7 +6,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/swagger/{route}", "UpstreamPathTemplate": "/swagger/{route}",
@@ -23,7 +23,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/swagger/{route1}/{route2}", "UpstreamPathTemplate": "/swagger/{route1}/{route2}",
@@ -40,7 +40,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar", "UpstreamPathTemplate": "/scalar",
@@ -57,7 +57,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar/{route}", "UpstreamPathTemplate": "/scalar/{route}",
@@ -74,7 +74,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/scalar/{route1}/{route2}", "UpstreamPathTemplate": "/scalar/{route1}/{route2}",
@@ -127,7 +127,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/api/{route}", "UpstreamPathTemplate": "/api/{route}",
@@ -144,7 +144,7 @@
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "localhost", "Host": "localhost",
"Port": 7174 "Port": 8088
} }
], ],
"UpstreamPathTemplate": "/api/{route}{id}", "UpstreamPathTemplate": "/api/{route}{id}",