diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2652ff..d26ef91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,10 @@ jobs: ports: - "5432:5432" #endif + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 + ports: + - "9200:9200" steps: - name: Set up JDK 17 uses: actions/setup-java@v4 @@ -44,7 +48,7 @@ jobs: dotnet tool install --global dotnet-sonarscanner --version 6.1.0 - name: Install EF Core Tools run: | - dotnet tool install --global dotnet-ef --version 8.0.1 + dotnet tool install --global dotnet-ef --version 8.0.10 - name: Build and test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/Company.Orion.Api/Program.cs b/src/Company.Orion.Api/Program.cs index 926cf68..f5cbed7 100644 --- a/src/Company.Orion.Api/Program.cs +++ b/src/Company.Orion.Api/Program.cs @@ -5,16 +5,12 @@ var builder = WebApplication.CreateBuilder(args); -builder.Configuration.ConfigureLogging(); - builder.Host.UseSerilog(); builder.Services.ConfigureServices(builder.Configuration); var app = builder.Build(); -app.UseSerilogRequestLogging(); - app.UseMiddleware(); app.ConfigureApp(); diff --git a/src/Company.Orion.Api/appsettings.json b/src/Company.Orion.Api/appsettings.json index 9f7ff75..1911388 100644 --- a/src/Company.Orion.Api/appsettings.json +++ b/src/Company.Orion.Api/appsettings.json @@ -8,8 +8,8 @@ "AllowedHosts": "*", "Serilog": { - "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console" ], "AppName": "Orion Api", + "Enrich": [ "FromLogContext", "WithThreadId", "WithMachineName" ], "IndexFormat": "orion-api", "MinimumLevel": { "Default": "Information", @@ -18,6 +18,9 @@ "System": "Warning" } }, - "Enrich": [ "FromLogContext", "WithThreadId", "WithMachineName" ] + "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console" ] + }, + "ElasticConfiguration": { + "Uri": "http://localhost:9200" } }