Skip to content

Commit

Permalink
net 8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AoshiW committed Nov 5, 2023
1 parent 67ac241 commit 4f17845
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-buildstatus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
dotnet-version: [ '8.0.x' ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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
- name: Build TwitchLib.Communication
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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
- name: Build TwitchLib.Communication
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
dotnet-version: [ '8.0.x' ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
dotnet-version: [ '8.0.x' ]

steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0-rc.2.23479.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Enrichers.Context" Version="4.6.0" />
Expand Down
11 changes: 5 additions & 6 deletions src/TwitchLib.Communication/Extensions/LogExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma warning disable SYSLIB1006 // Multiple logging methods cannot use the same event id within a class
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using Microsoft.Extensions.Logging;

namespace TwitchLib.Communication.Extensions
Expand All @@ -17,16 +16,16 @@ public static void TraceMethodCall(this ILogger logger, Type type, [CallerMember
TraceMethodCallCore(logger, type, callerMemberName, callerLineNumber);
}

[LoggerMessage(0, LogLevel.Trace, "{type}.{callerMemberName} at line {callerLineNumber} is called")]
[LoggerMessage(LogLevel.Trace, "{type}.{callerMemberName} at line {callerLineNumber} is called")]
static partial void TraceMethodCallCore(this ILogger logger, Type type, string callerMemberName, int callerLineNumber);

[LoggerMessage(0, LogLevel.Error, "Exception in {type}.{callerMemberName} at line {callerLineNumber}")]
[LoggerMessage(LogLevel.Error, "Exception in {type}.{callerMemberName} at line {callerLineNumber}")]
public static partial void LogExceptionAsError(this ILogger logger, Type type, Exception exception, [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = 0);

[LoggerMessage(0, LogLevel.Information, "Exception in {type}.{callerMemberName} at line {callerLineNumber}")]
[LoggerMessage(LogLevel.Information, "Exception in {type}.{callerMemberName} at line {callerLineNumber}")]
public static partial void LogExceptionAsInformation(this ILogger logger, Type type, Exception exception, [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = 0);

[LoggerMessage(0, LogLevel.Trace, "{type}.{callerMemberName} at line {callerLineNumber}: {action}")]
[LoggerMessage(LogLevel.Trace, "{type}.{callerMemberName} at line {callerLineNumber}: {action}")]
public static partial void TraceAction(this ILogger logger, Type type, string action, [CallerMemberName] string callerMemberName = "", [CallerLineNumber] int callerLineNumber = 0);
}
}
4 changes: 2 additions & 2 deletions src/TwitchLib.Communication/TwitchLib.Communication.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down Expand Up @@ -29,6 +29,6 @@
<InternalsVisibleTo Include="$(MSBuildProjectName).Tests"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0"/>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0-rc.2.23479.6" />
</ItemGroup>
</Project>

0 comments on commit 4f17845

Please sign in to comment.