Skip to content

Commit 1b84d58

Browse files
committed
Better logging
1 parent 796eb00 commit 1b84d58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/github/legacymoddingmc/notenoughverbosity/NotEnoughVerbosity.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ private static boolean needsToRun() {
5454
if(rootConfig.getLevel().intLevel() < Level.ALL.intLevel()) {
5555
LOGGER.warn("Found root logger with verbosity " + rootConfig.getLevel() + ", will try to switch to Forge config.");
5656
foundBadRoot = true;
57+
break;
5758
} else {
5859
LOGGER.debug("Found root logger with verbosity " + rootConfig.getLevel() + ", this is fine.");
5960
}
@@ -75,7 +76,8 @@ public static void reconfigureLog4j() {
7576
String cookie = UUID.randomUUID().toString();
7677
LOGGER.info("Magic cookie: " + cookie);
7778
setLog4jConfig(log4jUri);
78-
LOGGER.info("Reconfigured logger to use config at " + log4jUri);
79+
int count = getLoggerContexts().size();
80+
LOGGER.info("Reconfigured logger (" + count + " context" + (count != 1 ? "s" : "") + ") to use config at " + log4jUri);
7981
LOGGER.info("Earlier messages may be located in latest.log");
8082

8183
List<String> latestLogLines = readLatestLog(cookie);

0 commit comments

Comments
 (0)