Description
I think StatusLogger doesn't honor log4j2.StatusLogger.DateFormat property, when configuration has a status level set. That is, in the following StatusLogger block:
public void logMessage(final String fqcn, final Level level, final Marker marker, final Message msg, final Throwable t) { // ... // LOG4J2-1813 if system property "log4j2.debug" is defined, all status logging is enabled if (isDebugPropertyEnabled() || (listeners.size() <= 0)) { logger.logMessage(fqcn, level, marker, msg, t); } else { for (final StatusListener listener : listeners) { if (data.getLevel().isMoreSpecificThan(listener.getStatusLevel())) { listener.log(data); } } } }
When status="trace" is set in log4j2.xml, else block kicks in. There the following StatusConsoleListener method gets called:
public void log(final StatusData data) { if (!filtered(data)) { stream.println(data.getFormattedStatus()); } }
There StatusData#getFormattedStatus() completely ignores log4j2.StatusLogger.DateFormat while formatting the date.
Attachments
Issue Links
- links to