mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-20 06:29:16 +00:00
Use LogLevel.log() rather than checking the log level manually
See gh-46466 Signed-off-by: Now <khj990322@gmail.com>
This commit is contained in:
+1
-8
@@ -246,14 +246,7 @@ public class DeferredLog implements Log {
|
||||
}
|
||||
|
||||
static void logTo(Log log, LogLevel level, Object message, Throwable throwable) {
|
||||
switch (level) {
|
||||
case TRACE -> log.trace(message, throwable);
|
||||
case DEBUG -> log.debug(message, throwable);
|
||||
case INFO -> log.info(message, throwable);
|
||||
case WARN -> log.warn(message, throwable);
|
||||
case ERROR -> log.error(message, throwable);
|
||||
case FATAL -> log.fatal(message, throwable);
|
||||
}
|
||||
level.log(log, message, throwable);
|
||||
}
|
||||
|
||||
static class Lines implements Iterable<Line> {
|
||||
|
||||
Reference in New Issue
Block a user