ramanathan1504 commented on code in PR #4116:
URL: https://github.com/apache/logging-log4j2/pull/4116#discussion_r3674970315


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/AppenderRefComponentBuilder.java:
##########
@@ -16,8 +16,97 @@
  */
 package org.apache.logging.log4j.core.config.builder.api;
 
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.AppenderRef;
+import org.jspecify.annotations.Nullable;
+
 /**
- * Assembler for constructing AppenderRef Components.
+ * A builder interface for constructing and configuring {@link AppenderRef} 
components in a Log4j configuration.
+ *
+ * <p>
+ *   Instances of this builder are designed for single-threaded use and are 
not thread-safe. Developers
+ *   should avoid sharing instances between threads.
+ * </p>
+ *
  * @since 2.4
  */
-public interface AppenderRefComponentBuilder extends 
FilterableComponentBuilder<AppenderRefComponentBuilder> {}
+public interface AppenderRefComponentBuilder extends 
FilterableComponentBuilder<AppenderRefComponentBuilder> {
+
+    /**
+     * Sets the "{@code level}" attribute on the appender-reference component.
+     * <p>
+     *   If the given {@code level} is {@code null}, the attribute will be 
removed from the component.
+     * </p>
+     *
+     * @param level the level
+     * @return this builder (for chaining)
+     */
+    default AppenderRefComponentBuilder setLevel(@Nullable String level) {
+        return setAttribute("level", level);
+    }
+
+    /**
+     * Sets the "{@code level}" attribute on the appender-reference component.
+     * <p>
+     *   If the given {@code level} is {@code null}, the attribute will be 
removed from the component.
+     * </p>
+     *
+     * @param level the level
+     * @return this builder (for chaining)
+     */
+    default AppenderRefComponentBuilder setLevelAttribute(@Nullable String 
level) {

Review Comment:
   @vy bd3b6d1



-- 
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