Index: log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java (revision ab33665bf3eb542ef0dc751f9b44a59043003fb0) +++ log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationFactory.java (revision ) @@ -46,6 +46,7 @@ import org.apache.logging.log4j.core.util.Loader; import org.apache.logging.log4j.core.util.NetUtils; import org.apache.logging.log4j.core.util.ReflectionUtil; +import org.apache.logging.log4j.status.StatusData; import org.apache.logging.log4j.status.StatusLogger; import org.apache.logging.log4j.util.LoaderUtil; import org.apache.logging.log4j.util.PropertiesUtil; @@ -466,7 +467,15 @@ LOGGER.error("No log4j2 configuration file found. " + "Using default configuration: logging only errors to the console. " + "Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level'" + - " to TRACE to show Log4j2 internal initialization logging."); + " to TRACE to show all Log4j2 internal initialization logging."); + List messages = ((StatusLogger) LOGGER).getStatusData(); + if (messages.size() > 1) { + final int count = Math.min(11, messages.size()); + System.err.println("The previous " + (count - 1) + " status messages are:"); + for (int i = messages.size() - count; i <= messages.size() - 2; i++) { // exclude last message + System.err.println(messages.get(i).getFormattedStatus()); + } + } return new DefaultConfiguration(); }