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

caseclass.macros.Log.scala Maven / Gradle / Ivy

The newest version!
package caseclass.macros

import scala.reflect.macros.whitebox


private[macros] class Log(c: whitebox.Context) {

  def inf(x: String): Unit = {
    c.info(c.enclosingPosition, x, force = true)
  }

  def fail(x: String): Nothing = {
    c.abort(c.enclosingPosition, x)
  }

  def warn(x: String): Unit = {
    c.warning(c.enclosingPosition, x)
  }

  def err(x: String): Unit = {
    c.error(c.enclosingPosition, x)
  }
}

object Log {

  def apply(c: whitebox.Context): Log = new Log(c)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy