Skip to content

Commit a07bb1b

Browse files
authored
feat: update .net support and include more enrichers (#111)
* feat: remove support for .net5 and update nuget documentation * feat: add enrichers for common azure claims * fix: add conditional package reference for different targetFramework * fix: set correct targetframework
1 parent 2a74260 commit a07bb1b

File tree

10 files changed

+68
-28
lines changed

10 files changed

+68
-28
lines changed

Diff for: .nuke/build.schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"AppVeyor",
3030
"AzurePipelines",
3131
"Bamboo",
32+
"Bitbucket",
3233
"Bitrise",
3334
"GitHubActions",
3435
"GitLab",

Diff for: assets/intility-logo.png

1.88 KB
Loading

Diff for: samples/MinimalApiSample/MinimalApiSample.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>

Diff for: samples/WebSample/WebSample.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

Diff for: samples/WorkerSample/WorkerSample.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk.Worker">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<UserSecretsId>dotnet-WorkerSample-E1FD34C8-B239-4D87-8143-0BA5129DDB52</UserSecretsId>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
9+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -11,14 +11,23 @@
1111
<Description>
1212
Enable Elasticsearch logging provider.
1313
</Description>
14+
<owners>Intility</owners>
15+
<Company>Intility</Company>
16+
<authors>Herman Jensen, Emil Kjelsrud, Thorstein Løkensgard</authors>
17+
<RepositoryUrl>https://github.com/Intility/Intility.Logging</RepositoryUrl>
18+
<PackageIcon>intility-logo.png</PackageIcon>
1419
</PropertyGroup>
1520

1621
<ItemGroup>
17-
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.0" />
22+
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
1823
</ItemGroup>
1924

2025
<ItemGroup>
2126
<ProjectReference Include="..\Intility.Extensions.Logging\Intility.Extensions.Logging.csproj" />
2227
</ItemGroup>
2328

29+
<ItemGroup>
30+
<None Include="../../assets/intility-logo.png" Pack="true" Visible="false" PackagePath="\" />
31+
</ItemGroup>
32+
2433
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -11,15 +11,24 @@
1111
<Description>
1212
Enable Sentry instrumentation and logging provider.
1313
</Description>
14+
<owners>Intility</owners>
15+
<Company>Intility</Company>
16+
<authors>Herman Jensen, Emil Kjelsrud, Thorstein Løkensgard</authors>
17+
<RepositoryUrl>https://github.com/Intility/Intility.Logging</RepositoryUrl>
18+
<PackageIcon>intility-logo.png</PackageIcon>
1419
</PropertyGroup>
1520

1621
<ItemGroup>
17-
<PackageReference Include="Sentry.AspNetCore" Version="3.30.0" />
18-
<PackageReference Include="Sentry.Serilog" Version="3.31.0" />
22+
<PackageReference Include="Sentry.AspNetCore" Version="3.40.1" />
23+
<PackageReference Include="Sentry.Serilog" Version="3.40.1" />
1924
</ItemGroup>
2025

2126
<ItemGroup>
2227
<ProjectReference Include="..\Intility.Extensions.Logging\Intility.Extensions.Logging.csproj" />
2328
</ItemGroup>
2429

30+
<ItemGroup>
31+
<None Include="../../assets/intility-logo.png" Pack="true" Visible="false" PackagePath="\" />
32+
</ItemGroup>
33+
2534
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -12,18 +12,27 @@
1212
Common logging infrastructure with extension primitives.
1313
Please do not install this package directly.
1414
</Description>
15+
<owners>Intility</owners>
16+
<Company>Intility</Company>
17+
<authors>Herman Jensen, Emil Kjelsrud, Thorstein Løkensgard</authors>
18+
<RepositoryUrl>https://github.com/Intility/Intility.Logging</RepositoryUrl>
19+
<PackageIcon>intility-logo.png</PackageIcon>
1520
</PropertyGroup>
1621

1722
<ItemGroup>
18-
<PackageReference Include="Serilog" Version="2.12.0" />
23+
<PackageReference Include="Serilog" Version="3.0.1" />
1924
</ItemGroup>
2025

21-
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
22-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
23-
</ItemGroup>
26+
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
27+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
28+
</ItemGroup>
2429

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
26-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
27-
</ItemGroup>
30+
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
31+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
32+
</ItemGroup>
33+
34+
<ItemGroup>
35+
<None Include="../../assets/intility-logo.png" Pack="true" Visible="false" PackagePath="\" />
36+
</ItemGroup>
2837

2938
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>
@@ -13,28 +13,38 @@
1313
or dotnet project using generic host mechanism. Additional logging
1414
capabilities are available through the extension packages Intility.Extensions.Logging.*
1515
</Description>
16+
<owners>Intility</owners>
17+
<Company>Intility</Company>
18+
<authors>Herman Jensen, Emil Kjelsrud, Thorstein Løkensgard</authors>
19+
<RepositoryUrl>https://github.com/Intility/Intility.Logging</RepositoryUrl>
20+
<PackageIcon>intility-logo.png</PackageIcon>
1621
</PropertyGroup>
1722

1823
<ItemGroup>
1924
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
2025
<PackageReference Include="Serilog.Enrichers.AssemblyName" Version="1.0.9" />
2126
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" />
2227
<PackageReference Include="Serilog.Enrichers.Memory" Version="1.0.4" />
28+
<PackageReference Include="Serilog.Enrichers.AzureClaims" Version="1.0.1" />
2329
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="9.0.0" />
2430
</ItemGroup>
2531

26-
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
27-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" />
28-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
29-
</ItemGroup>
30-
31-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
32-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
33-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.2" />
34-
</ItemGroup>
32+
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
33+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
34+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4" />
35+
</ItemGroup>
3536

37+
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
38+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
39+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
40+
</ItemGroup>
41+
3642
<ItemGroup>
3743
<ProjectReference Include="..\Intility.Extensions.Logging\Intility.Extensions.Logging.csproj" />
3844
</ItemGroup>
3945

46+
<ItemGroup>
47+
<None Include="../../assets/intility-logo.png" Pack="true" Visible="false" PackagePath="\" />
48+
</ItemGroup>
49+
4050
</Project>

Diff for: src/Intility.Logging.AspNetCore/LoggerBuilderExtensions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public static ILoggerBuilder UseDefaultEnrichers(this ILoggerBuilder builder)
1616
.Enrich.WithEnvironmentUserName()
1717
.Enrich.WithMachineName()
1818
.Enrich.WithAssemblyName()
19-
.Enrich.WithMemoryUsage();
19+
.Enrich.WithMemoryUsage()
20+
.Enrich.WithDisplayName()
21+
.Enrich.WithAppId();
2022

2123
return builder;
2224
}

0 commit comments

Comments
 (0)