Skip to content

Commit

Permalink
Add missing logger methods that take Java Supplier
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz authored and eed3si9n committed Dec 13, 2023
1 parent cd6e992 commit 7762dd2
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
Original file line number Diff line number Diff line change
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 7762dd2

Please sign in to comment.