JWT007 opened a new pull request, #3451: URL: https://github.com/apache/logging-log4j2/pull/3451
Improve on extensibility of BuiltConfiguration/DefaultConfigurationBuilder ConfigurationBuilder interface: - added convenience methods to ConfigurationBuilder interface (to better sync with existing methods) - annotated as @ProviderType (see ticket) DefaultConfigurationBuilder - removed fields for configuration attributtes - they are set as atttributes directly on rootComponent instead - added a protected generic support method 'getOrCreateComponent' (also for subclasses to use) - added methods: - `public ConfigurationBuilder<T> addProperty(PropertyComponentBuilder)` - `protected Optional<String> getRootProperty(String)` - `protected Optional<Component> getComponent(String)` - `protected Component getOrCreateComponent(String)` - `protected Component getRootComponent()` - added setMonitorInterval(int) and setShutdownTimeout(long) for direct setting - added setMonitorInterval(int, TimeUnit) and setShutdownTimeout(String, TimeUnit) so both methods have a string and a number variant - added protected getters for attributes and child components - moved initialization from "build(boolean)" to BuiltConfiguration constructor since everything is transported overr the `rootComponent` now - added more argument validation - improved javadoc BuiltConfiguration: - removed Component fields (appenders/loggers/etc.) and replaced with protected generic Optional accessors directly from 'rootComponent' - attribute processing done in constructor (moved from DefaultConfigurationBuilder#build()) - added protected accessors (getRootComponent, getChildComponent, and getChildComponents) so subclasses can access the root component - guarded int/long conversion for 'monitorInterval' and 'shutdownTimeout' - added more argument validation - improved javadoc - * In BuiltConfiguration component-to-node conversion moved to 'setup()' method (more in line with for example XmlConfiguration) + added CustomBuiltConfigurationTest unit-tests + updated "revision" in main pom.xml to 2.25.0 due to baseline majorr change to ConfigurationBuilder interface + updated package-info.java versions to 2.25.0 in - `org.apache.logging.log4j.core.config.builder.api` - `org.apache.logging.log4j.core.config.builder.impl` - `org.apache.logging.log4j.core.config.properties` + fixed bug in UnitTest `Configurator1Test` where the test configuration was being inittialized twice NOTE to reviewers - please review carefully due to API changes and specifically: * the move of all attributes/components directly onto `rootComponent` in DefaultConfigurationBuilder * the move of initializatiton logic for attributes from `DefaultConfigurationBuilder#build` to the `BuiltConfiguration` constructor -- 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: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org