Add missing logger methods that take Java Supplier

This commit is contained in:
Matthias Kurz 2023-12-04 10:51:27 +01:00
parent e6f0ed8da7
commit 2d7f087753
No known key found for this signature in database
GPG Key ID: 0B4AAA92F1117EF5
1 changed files with 2 additions and 0 deletions

View File

@ -40,11 +40,13 @@ abstract class Logger extends xLogger {
def success(message: => String): Unit
def log(level: Level.Value, message: => String): Unit
def verbose(msg: Supplier[String]): Unit = debug(msg)
def debug(msg: Supplier[String]): Unit = log(Level.Debug, msg)
def warn(msg: Supplier[String]): Unit = log(Level.Warn, msg)
def info(msg: Supplier[String]): Unit = log(Level.Info, msg)
def error(msg: Supplier[String]): Unit = log(Level.Error, msg)
def trace(msg: Supplier[Throwable]): Unit = trace(msg.get())
def success(msg: Supplier[String]): Unit = success(msg.get())
def log(level: Level.Value, msg: Supplier[String]): Unit = log(level, msg.get)
}