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

#124 LoggingEvent.Level not nullable #137

Closed FreeAndNil closed 7 months ago

FreeAndNil commented 7 months ago

124 LoggingEvent.Level not nullable

@erikmav what do you think about this approach?

erikmav commented 7 months ago

In the 2.x codebase a null level was handled as an allowed option, and some formatters use default behaviors on a null value (search for level is null across the codebase). IOW this is probably a back compat problem where we might break people. Maybe that's OK in v3... which means we need if (level is null) { throw new ArgumentNullException(nameof(level)); } anywhere we're receiving a level from the user.