ramanathan1504 commented on code in PR #4116:
URL: https://github.com/apache/logging-log4j2/pull/4116#discussion_r3674989899
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java:
##########
@@ -72,384 +116,499 @@ default ConfigurationBuilder<T>
addComponent(ComponentBuilder<?> builder) {
}
/**
- * Adds a Filter component.
- * @param builder the FilterComponentBuilder with all of its attributes
and sub components set.
- * @return this builder instance.
+ * Adds the {@link Filter} component built by the given {@code
FilterComponentBuilder} to this builder.
+ * <p>
+ * Note: the provided {@code builder} will be built by this method;
therefore, it must be fully configured
+ * <i>before</i> calling this method. Changes to the builder after
calling this method will not have
+ * any effect.
+ * </p>
+ *
+ * @param builder The {@code FilterComponentBuilder} with all of its
attributes and subcomponents set.
+ * @return this builder (for chaining)
+ * @throws NullPointerException if the given {@code builder} is {@code
null}
*/
ConfigurationBuilder<T> add(FilterComponentBuilder builder);
/**
- * Adds a Logger component.
- * @param builder The LoggerComponentBuilder with all of its attributes
and sub components set.
- * @return this builder instance.
+ * Adds the {@link Logger} component built by the given {@code
LoggerComponentBuilder} to this builder.
+ * <p>
+ * Note: the provided {@code builder} will be built by this method;
therefore, it must be fully configured
+ * <i>before</i> calling this method. Changes to the builder after
calling this method will not have
+ * any effect.
+ * </p>
+ *
+ * @param builder The {@code LoggerComponentBuilder} with all of its
attributes and subcomponents set.
+ * @return this builder (for chaining)
+ * @throws NullPointerException if the given {@code builder} is {@code
null}
*/
ConfigurationBuilder<T> add(LoggerComponentBuilder builder);
/**
- * Adds the root Logger component.
- * @param builder The RootLoggerComponentBuilder with all of its
attributes and sub components set.
- * @return this builder instance.
+ * Adds the {@link RootLogger} component built by the given {@code
RootLoggerComponentBuilder}
+ * to this builder.
+ * <p>
+ * Note: the provided {@code builder} will be built by this method;
therefore, it must be fully configured
+ * <i>before</i> calling this method. Changes to the builder after
calling this method will not have
+ * any effect.
+ * </p>
+ *
+ * @param builder The {@code RootLoggerComponentBuilder} with all of its
attributes and subcomponents set.
+ * @return this builder (for chaining)
+ * @throws NullPointerException if the given {@code builder} is {@code
null}
*/
ConfigurationBuilder<T> add(RootLoggerComponentBuilder builder);
/**
- * Adds a Property key and value.
- * @param key The property key.
- * @param value The property value.
- * @return this builder instance.
+ * Adds a the {@link Property} component built by the given {@link
PropertyComponentBuilder}.
+ * @param builder the {@code PropertyComponentBuilder} to add
+ * @return this builder (for chaining)
*/
- ConfigurationBuilder<T> addProperty(String key, String value);
+ ConfigurationBuilder<T> add(PropertyComponentBuilder builder);
Review Comment:
@vy e163eec
--
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]