apache / logging-log4net

Apache Log4net is a versatile, feature-rich, efficient logging API and backend for .NET
https://logging.apache.org/log4net
Apache License 2.0
859 stars 327 forks source link

Nullable and modernization part 6 #132

Closed erikmav closed 7 months ago

erikmav commented 7 months ago

Adjusted nullability on some classes after applying the 3.0 binary to two existing projects that have nullable enabled. Changed nullable warnings to errors.

erikmav commented 7 months ago

For #124

erikmav commented 7 months ago

@FreeAndNil the ugliest adaptations I had to make with the new binary:

erikmav commented 7 months ago

@FreeAndNil I just tried setting LoggingEvent.Level to non-nullable and set to Level.All. Problem is that null is converted into different policies by different appenders (Debug, Info, or All) so a blanket All policy does not work. Seems like it needs to be left nullable for back compat.