All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sbt.testing.Logger.scala Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2
Show newest version
package sbt.testing

/** A logger through which to provide feedback to the user about a run.
 *
 *  The difference between the event handler and the logger is that the event
 *  handler is for events intended to be consumed by the client software
 *  whereas the logger is for messages intended to be consumed by the client
 *  *user* (i.e., a human).
 *
 *  Implementations of this interface must be thread-safe.
 */
trait Logger {

  /** True if ANSI color codes are understood by this instance. */
  def ansiCodesSupported(): Boolean

  /** Provide an error message.
   *
   *  @param msg the error message
   */
  def error(msg: String): Unit

  /** Provide an warning message.
   *
   *  @param msg the warning message
   */
  def warn(msg: String): Unit

  /** Provide an info message.
   *
   *  @param msg the info message
   */
  def info(msg: String): Unit

  /** Provide a debug message.
   *
   *  @param msg the debug message
   */
  def debug(msg: String): Unit

  /** Provide a stack trace
   *
   *  @param t the Throwable containing the stack trace being logged
   */
  def trace(t: Throwable): Unit
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy