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

Updates for Serilog 4 #52

Merged
merged 6 commits into from
Jul 3, 2024
Merged

Updates for Serilog 4 #52

merged 6 commits into from
Jul 3, 2024

Conversation

Numpsy
Copy link
Member

@Numpsy Numpsy commented Jul 2, 2024

  • Set version to 3.0.0
  • Update TFMs to match Seriog 4
  • Update dependencies
  • Update the nuget package license/readme/icon to current standards
  • Generate a snupkg
  • enable nullability annotations

The System.Configuration.ConfigurationManager dependency in the .NET(Core) builds is left at 4.4.1 for now

@Numpsy
Copy link
Member Author

Numpsy commented Jul 2, 2024

Has a couple of nullability warnings to fix:

serilog-settings-appsettings\src\Serilog.Settings.AppSettings\Settings\AppSettings\AppSettingsSettings.cs(59,67): warning CS8604: Possible null reference argument for parameter 'key' in 'KeyValuePair<string, string>.KeyValuePair(string key, string value)'

@Numpsy Numpsy mentioned this pull request Jul 2, 2024
@@ -56,7 +56,7 @@ public void Configure(LoggerConfiguration loggerConfiguration)
else
{
settings = ConfigurationManager.AppSettings.AllKeys
.Select(k => new KeyValuePair<string, string>(k, ConfigurationManager.AppSettings[k]));
.Select(k => new KeyValuePair<string, string>(k, ConfigurationManager.AppSettings[k]!));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ! here is going on the assumption that there will always be a value for a specified key, when the key in question is from AllKeys

@Numpsy Numpsy marked this pull request as ready for review July 3, 2024 11:11
@nblumhardt nblumhardt merged commit aae34c3 into serilog:dev Jul 3, 2024
1 check passed
@nblumhardt
Copy link
Member

Looks great 👍

@nblumhardt nblumhardt mentioned this pull request Jul 3, 2024
@Numpsy Numpsy deleted the serilog_4 branch July 4, 2024 10:27
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.

2 participants