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

2.12.0 Release #1705

Merged
merged 43 commits into from Sep 13, 2022
Merged

2.12.0 Release #1705

merged 43 commits into from Sep 13, 2022

Conversation

nblumhardt
Copy link
Member

@nblumhardt nblumhardt commented Jul 25, 2022

Highlights of 2.12.0

Improved and expanded <Nullable>enable</Nullable> support

A huge number of commits have gone into completing and refining non-null reference type annotations, which now cover the entire public Serilog API. The Serilog project itself now builds with non-null reference type checking globally enabled 🎉

IAsyncDisposable support

Sinks that need to flush changes using asynchronous APIs can now implement IAsyncDisposable and prevent the possibility of deadlocking while waiting for tasks to complete.

To drive this, Logger can now be disposed via using async:

await using var log = new LoggerConfiguration().CreateLogger();

and the Log class provides Log.CloseAndFlushAsync():

await Log.CloseAndFlushAsync();

DateOnly and TimeOnly support

The DateOnly and TimeOnly types introduced in .NET 6 are now correctly handled as scalar values when capturing.

Merged PRs

nblumhardt and others added 30 commits April 24, 2022 10:15
* add explicit net6 target

* Update global.json

* Update BuildNativeUWP.ps1

* Update BuildNativeUWP.ps1

* remove uwp
* Remove wrong tag

* fix
* .

* .

* Update global.json

* FEATURE_DATE_AND_TIME_ONLY

* Update PropertyValueConverter.cs

Co-authored-by: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
* format  and formatProvider can be null

* Added missing space

Co-authored-by: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
* minor csproj cleanup

* Remove redundant originator key file property

Co-authored-by: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
* SettingValueConversions.ConvertToType() value cant be null

* Update KeyValuePairSettings.cs

* Update SettingValueConversionsTests.cs
* nullable in LogEventProperty

* nullable in JsonValueFormatter

* nullable in EventProperty

* nullable in LogContext

* enable nullable for EnricherStack

* remove "#nullable enable" and enable globally

* Update Logger.cs
so we dont get [NETSDK1138] The target framework 'netcoreapp2.1' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy.

Co-authored-by: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
SimonCropp and others added 12 commits August 25, 2022 11:15
* forgot to remove some Nullable>enable

* missed some #nullable enable
* leverage ITuple interface

* IVALUETUPLE

* resolve merge conflict

* missed a conflict

* const should be ITUPLE
* remove redundant type names

* Update KeyValuePairSettings.cs
* guard against null

* Create ArgumentNullTests.cs

* Update Guard.cs
* Support IAsyncDisposable.DisposeAsync() on Logger, and add Log.CloseAndFlushAsync()

* Add tests for Log.CloseAndFlushAsync()

* Seal DisposeAggregatingSink

* Fix tests

* Add missing ConfigureAwait(false)

* Implement IAsyncDisposable on remaining sink wrapper types

* More test coverage
@SimonCropp
Copy link
Contributor

@nblumhardt is this one baked? need help on anything else?

@nblumhardt
Copy link
Member Author

@SimonCropp 🍞 👍

For the IAsyncDisposable changes to be usable, we'll also need https://github.com/serilog/serilog-sinks-periodicbatching/pulls, so it would be great if you have time to take a look.

Some support in Serilog.Extensions.Logging and .Hosting is also going to be required, I'm not sure exactly how much work is involved but I should have a chance to check it out soon, and although it's a big part of the story, we probably shouldn't block on it.

I'll write up some release notes in this ticket now :-)

@nblumhardt nblumhardt marked this pull request as ready for review September 12, 2022 22:26
@nblumhardt
Copy link
Member Author

Think we're good to go! 😎

@nblumhardt
Copy link
Member Author

Ooh actually not quite, hold fire :-)

@nblumhardt
Copy link
Member Author

#1751

@nblumhardt nblumhardt merged commit 9f86301 into main Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants