Merge pull request #7447 from mkurz/more_logger_methods

[1.9.x] Add missing logger methods that take Java Supplier
This commit is contained in:
eugene yokota 2023-12-05 10:56:35 -05:00 committed by GitHub
commit 2d974be268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
}