slf4j-test
slf4j-test copied to clipboard
LoggingEvent should accept a null message
Other Slf4j implementations accept a null for the message when logging. I believe the slf4j API also doesn't label the message as @Nonnull.
Currently LoggingEvent has a checkNotNull check on message. Which causes my existing code, that does log a null, to get an NPE. I think it was probably done to be like the checks on the other Optional fields.
Since MessageFormatter supports null, I think it's safe to just remove the checkNotNull.
This is pretty annoying because the test logger's behaviour is different to the actual logger.