ppkarwasz commented on issue #1231:
URL: 
https://github.com/apache/logging-log4j2/issues/1231#issuecomment-1581303568

   Hi @lukaszspyra,
   
   Yes, adding `@Required` in the right places is what I had in mind. This will 
cause the `PluginBuilder` to log an error and return `null`.
   
   Logging an error and returning `null` is the way Log4j 2.x deals with 
**configuration** errors: we don't want to disrupt the application's logic. 
That's why I am not a big fan of `Objects.requireNonNull` assertions: 
`PluginBuilder` will not trigger them and programmatic configuration should 
check the preconditions **before** calling a factory method or builder.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to