ppkarwasz commented on code in PR #2249:
URL: https://github.com/apache/logging-log4j2/pull/2249#discussion_r1482887805


##########
log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java:
##########
@@ -56,50 +54,59 @@ public StatusConsoleListener(final Level level) {
      * @throws NullPointerException on null {@code level} or {@code stream}
      */
     public StatusConsoleListener(final Level level, final PrintStream stream) {
-        this(level, stream, SimpleLoggerFactory.getInstance());
-    }
-
-    StatusConsoleListener(final Level level, final PrintStream stream, final 
SimpleLoggerFactory loggerFactory) {
-        this.level = Objects.requireNonNull(level, "level");
-        this.stream = Objects.requireNonNull(stream, "stream");
-        this.logger = Objects.requireNonNull(loggerFactory, "loggerFactory")
-                .createSimpleLogger(
-                        "StatusConsoleListener", level, 
ParameterizedNoReferenceMessageFactory.INSTANCE, stream);
+        this.level = requireNonNull(level, "level");
+        this.stream = requireNonNull(stream, "stream");
     }
 
     /**
      * Sets the level to a new value.
-     * @param level The new Level.
+     *
+     * @param level the new level
+     * @throws NullPointerException on null {@code level}
      */
     public void setLevel(final Level level) {
-        this.level = level;
+        this.level = requireNonNull(level, "level");
     }
 
     /**
-     * Return the Log Level for which the Listener should receive events.
-     * @return the Log Level.
+     * Sets the output stream to a new value.
+     *
+     * @param stream the new output stream
+     * @throws NullPointerException on null {@code stream}
+     * @since 2.23.0

Review Comment:
   I don't know if the parameter of `@since` must be a valid version number. In 
practice JDK methods have annotations like `@since 1.8` and `@since 9`.
   
   I prefer `2.23`, but I don't mind too much `2.23.0`. I am mostly happy you 
annotated this method, since most methods are not annotated.



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