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:
Now
2025-08-13 15:00:26 +02:00
committed by Stéphane Nicoll
parent 6587e69597
commit fa226e890b
@@ -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> {