Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dotnet8 #30

Merged
merged 4 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./Peppermint.ReverseProxy.sln
- name: Build Portable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/Peppermint.ReverseProxy/Peppermint.ReverseProxy.csproj
- name: Build Portable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.HttpLogging;
using Serilog;
using Serilog;

namespace Peppermint.ReverseProxy.Configuration
{
Expand All @@ -19,12 +18,12 @@
IConfiguration config)
{
// Logging
var logger = new LoggerConfiguration()

Check warning on line 21 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)

Check warning on line 21 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)

Check warning on line 21 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)
.ReadFrom.Configuration(config)
.CreateLogger();

// Add logger to logging service.
services.AddLogging(config => config.AddSerilog(logger));

Check warning on line 26 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)

Check warning on line 26 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)

Check warning on line 26 in src/Peppermint.ReverseProxy/Configuration/DefaultLoggingExtensions.cs

View workflow job for this annotation

GitHub Actions / analysis

Make sure that this logger's configuration is safe. (https://rules.sonarsource.com/csharp/RSPEC-4792)
return services;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Peppermint.ReverseProxy/Peppermint.ReverseProxy.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>1.0.0</Version>
Expand All @@ -21,14 +21,14 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Yarp.ReverseProxy" Version="2.0.1" />
<PackageReference Include="Yarp.ReverseProxy" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Peppermint.ReverseProxy/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ private static void Main(string[] args)
// Dependencies injection
services.AddDefaultLogging(config);
services.AddYarpReverseProxy(builder);
services.AddHttpLogging(httpLogger =>
{
httpLogger.CombineLogs = true;
});

var app = builder.Build();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="NFluent" Version="3.0.1.352" />
Expand Down
Loading