fix log4j log format (#697)

pull/698/head
Michael Barry 2023-10-26 07:30:56 -04:00 zatwierdzone przez GitHub
rodzic a0cd4fa864
commit 2bb05a0797
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -14,7 +14,7 @@ public class LogUtil {
/** Prepends {@code [stage]} to all subsequent logs from this thread. */
public static void setStage(String stage) {
MDC.put(STAGE_KEY, stage);
MDC.put(STAGE_KEY, "[%s] ".formatted(stage));
}
/** Removes {@code [stage]} from subsequent logs from this thread. */

Wyświetl plik

@ -2,7 +2,7 @@ appenders=console
appender.console.type=Console
appender.console.name=STDOUT
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=%highlight{$${uptime:now} %level{length=3} %notEmpty{[%X{stage}] }- %msg%n%throwable}{FATAL=red, ERROR=red, WARN=YELLOW, INFO=normal, DEBUG=normal, TRACE=normal}
appender.console.layout.pattern=%highlight{$${uptime:now} %level{length=3} %X{stage}- %msg%n%throwable}{FATAL=red, ERROR=red, WARN=YELLOW, INFO=normal, DEBUG=normal, TRACE=normal}
packages=com.onthegomap.planetiler.util.log4j
rootLogger.level=debug
rootLogger.appenderRefs=stdout

Wyświetl plik

@ -2,7 +2,7 @@ appenders=console
appender.console.type=Console
appender.console.name=STDOUT
appender.console.layout.type=PatternLayout
appender.console.layout.pattern=$${uptime:now} %level{length=3} %notEmpty{[%X{stage}] }- %msg%n%throwable
appender.console.layout.pattern=$${uptime:now} %level{length=3} %X{stage}- %msg%n%throwable
packages=com.onthegomap.planetiler.util.log4j
rootLogger.level=warn
rootLogger.appenderRefs=stdout