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

Add support C# 8 nullable reference types #97

Closed
2 of 8 tasks
rafaelsc opened this issue Jul 18, 2020 · 3 comments
Closed
2 of 8 tasks

Add support C# 8 nullable reference types #97

rafaelsc opened this issue Jul 18, 2020 · 3 comments

Comments

@rafaelsc
Copy link
Contributor

Does this issue relate to a new feature or an existing bug?

  • Bug
  • New Feature

What is the target framework and operating system affected by this issue? Please see target frameworks & net standard matrix.

  • netstandard2.1. NEW
  • netCore 2.0
  • netCore 1.0
  • 4.7
  • 4.6.x
  • 4.5.x

Describe the solution you'd like
Enable nullable-references in Serilog and add update the codebase to support the nullable reference types in .NET Core 3.0 and 3.1.

Additional context
Links about the *Nullable reference types *:

@rafaelsc
Copy link
Contributor Author

Related - serilog/serilog#1455

@jwdonahue
Copy link

jwdonahue commented Jul 4, 2021

I would really love to see this feature enabled soon. This looks scary:

  var logger = loggerMinimumLevelConfiguration
           !.Enrich?.With(enricher)
           ?.WriteTo.File(logPathFileName,
                   rollingInterval: interval,
                   outputTemplate: outputTemplate)
           ?.CreateLogger();
  Verify.IsNotNull(logger);

Is there anything I can do to help it along?

@Numpsy
Copy link
Member

Numpsy commented Jun 20, 2024

I think the nullability annotations should be enabled in the latest version now.

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

No branches or pull requests

4 participants