Skip to content

Commit 71d1978

Browse files
committed
Update TFMs
1 parent db33d4f commit 71d1978

File tree

4 files changed

+6
-20
lines changed

4 files changed

+6
-20
lines changed

global.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Serilog.Enrichers.Thread/Enrichers/ThreadNameEnricher.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#if THREAD_NAME
1615
using System.Threading;
1716
using Serilog.Core;
1817
using Serilog.Events;
@@ -54,4 +53,3 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
5453
}
5554
}
5655
}
57-
#endif

src/Serilog.Enrichers.Thread/Serilog.Enrichers.Thread.csproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
<Description>Enrich Serilog events with properties from the current thread.</Description>
55
<VersionPrefix>3.2.0</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
7-
<TargetFrameworks>net45;netstandard1.0;netstandard2.0</TargetFrameworks>
7+
<!-- .NET Framework version targeting is frozen at these two TFMs. -->
8+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net471;net462</TargetFrameworks>
9+
<!-- Policy is to trim TFM-specific builds to `netstandard2.0`, `net6.0`,
10+
all active LTS versions, and optionally the latest RTM version, when releasing new
11+
major Serilog versions. -->
12+
<TargetFrameworks>$(TargetFrameworks);net8.0;net6.0;netstandard2.0</TargetFrameworks>
813
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
914
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1015
<AssemblyName>Serilog.Enrichers.Thread</AssemblyName>
@@ -25,24 +30,11 @@
2530
<PackageReference Include="Serilog" Version="2.9.0" />
2631
</ItemGroup>
2732

28-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
29-
<Reference Include="System" />
30-
<Reference Include="Microsoft.CSharp" />
31-
</ItemGroup>
32-
3333
<ItemGroup>
3434
<None Include="..\..\assets\serilog-enricher-nuget.png">
3535
<Pack>True</Pack>
3636
<PackagePath></PackagePath>
3737
</None>
3838
</ItemGroup>
3939

40-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
41-
<DefineConstants>$(DefineConstants);THREAD_NAME</DefineConstants>
42-
</PropertyGroup>
43-
44-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
45-
<DefineConstants>$(DefineConstants);THREAD_NAME</DefineConstants>
46-
</PropertyGroup>
47-
4840
</Project>

src/Serilog.Enrichers.Thread/ThreadLoggerConfigurationExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
1615
using System;
1716
using System.Threading;
1817
using Serilog.Configuration;
@@ -39,7 +38,6 @@ public static LoggerConfiguration WithThreadId(
3938
return enrichmentConfiguration.With<ThreadIdEnricher>();
4039
}
4140

42-
#if THREAD_NAME
4341
/// <summary>
4442
/// Enrich log events with a ThreadName property containing the <see cref="Thread.CurrentThread"/> <see cref="Thread.Name"/>.
4543
/// </summary>
@@ -52,6 +50,5 @@ public static LoggerConfiguration WithThreadName(
5250
if (enrichmentConfiguration == null) throw new ArgumentNullException(nameof(enrichmentConfiguration));
5351
return enrichmentConfiguration.With<ThreadNameEnricher>();
5452
}
55-
#endif
5653
}
5754
}

0 commit comments

Comments
 (0)