You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/10/16 20:31:48 UTC

[GitHub] [logging-log4j2] vy commented on a diff in pull request #1107: LOG4J2-3584 Make StatusConsoleListener use SimpleLogger internally.

vy commented on code in PR #1107:
URL: https://github.com/apache/logging-log4j2/pull/1107#discussion_r996491237


##########
log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java:
##########
@@ -75,14 +75,23 @@ public final class StatusLogger extends AbstractLogger {
 
     private static final String NOT_AVAIL = "?";
 
-    private static final PropertiesUtil PROPS = new PropertiesUtil("log4j2.StatusLogger.properties");
+    static final PropertiesUtil PROPS = new PropertiesUtil("log4j2.StatusLogger.properties");
 
     private static final int MAX_ENTRIES = PROPS.getIntegerProperty(MAX_STATUS_ENTRIES, 200);
 
     private static final String DEFAULT_STATUS_LEVEL = PROPS.getStringProperty(DEFAULT_STATUS_LISTENER_LEVEL);
 
+    static final String DATE_FORMAT = PROPS.getStringProperty(STATUS_DATE_FORMAT);
+
+    static final boolean DATE_FORMAT_PROVIDED = Strings.isNotBlank(DATE_FORMAT);
+
+    static final boolean DEBUG_ENABLED = PropertiesUtil
+            .getProperties()
+            .getBooleanProperty(Constants.LOG4J2_DEBUG, false, true);

Review Comment:
   Fixed in 7877defe18ca5fb820da095c022dc3065a02c67a. Mind checking, please?



##########
log4j-api/src/main/java/org/apache/logging/log4j/status/StatusConsoleListener.java:
##########
@@ -52,6 +59,17 @@ public StatusConsoleListener(final Level level, final PrintStream stream) {
         }
         this.level = level;
         this.stream = stream;
+        this.logger = new SimpleLogger(
+                "StatusConsoleListener",
+                level,
+                false,
+                true,
+                StatusLogger.DATE_FORMAT_PROVIDED,
+                false,
+                StatusLogger.DATE_FORMAT,
+                ParameterizedNoReferenceMessageFactory.INSTANCE,
+                StatusLogger.PROPS,
+                stream);

Review Comment:
   Fixed in 7877defe18ca5fb820da095c022dc3065a02c67a. Mind checking, please?



-- 
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-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org