Skip to content

Commit

Permalink
Merge pull request #7447 from mkurz/more_logger_methods
Browse files Browse the repository at this point in the history
[1.9.x] Add missing logger methods that take Java Supplier
  • Loading branch information
eed3si9n committed Dec 5, 2023
2 parents e6f0ed8 + 2d7f087 commit 2d974be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/util-logging/src/main/scala/sbt/util/Logger.scala
Expand Up @@ -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)
}

Expand Down

0 comments on commit 2d974be

Please sign in to comment.