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

Update to .NET 8 dependencies #55

Merged
merged 3 commits into from
Jan 24, 2024
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
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,13 @@ Seq.Extensions.Logging.SelfLog.Enable(message => {
* Turn on the `SelfLog` as described above to check for connectivity problems and other issues on the client side.
* [Raise an issue](https://github.com/datalust/seq-extensions-logging/issues), ask for help on the [Seq support forum](http://docs.datalust.co/discuss) or email **[email protected]**.

### Migrating to Serilog
### Versioning policy

This package is based on a subset of the powerful [Serilog](https://serilog.net) library. Not all of the options supported by the Serilog and Seq client libraries are present in
the _Seq.Extensions.Logging_ package. Migrating to the full Serilog API however is very easy:
The major version of this package tracks the major version of its _Microsoft.Extensions.Logging_ dependency. So, if your
application (on any target runtime) is targeting `net6.0`, use the latest 6.* version of this package. Likewise, if
you're targeting `net8.0`, target a 8.* version of _Seq.Extensions.Logging_ for the best experience.

### Credits

1. Install packages _Serilog_, _Serilog.Extensions.Logging_ and _Serilog.Sinks.Seq_.
2. Follow the instructions [here](https://github.com/serilog/serilog-extensions-logging) to change `AddSeq()` into `AddSerilog()` with a `LoggerConfiguration` object passed in
3. Add `WriteTo.Seq()` to the Serilog configuration as per [the example](https://github.com/serilog/serilog-sinks-seq) given for the Seq sink for Serilog
This package is based on a subset of the powerful [Serilog](https://serilog.net) library. Not all of the options supported by the Serilog and Seq client libraries are present in
the _Seq.Extensions.Logging_ package.
8 changes: 4 additions & 4 deletions example/ConsoleExample/ConsoleExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion example/WebExample/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public IActionResult Index()
{
_logger.LogInformation("Events in this block have additional properties attached");
}

return View();
}

Expand Down
28 changes: 0 additions & 28 deletions example/WebExample/Properties/launchSettings.json

This file was deleted.

6 changes: 5 additions & 1 deletion example/WebExample/WebExample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -10,4 +10,8 @@
<ProjectReference Include="..\..\src\Seq.Extensions.Logging\Seq.Extensions.Logging.csproj" />
</ItemGroup>

<ItemGroup>
<None Remove="Properties\launchSettings.json" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.300",
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
Loading