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

cask.util.Logger.scala Maven / Gradle / Ivy

The newest version!
package cask.util

import sourcecode.{File, Line, Text}

trait Logger {
  def exception(t: Throwable): Unit

  def debug(t: sourcecode.Text[Any])(implicit f: sourcecode.File, line: sourcecode.Line): Unit
}
object Logger{
  object Console {
    implicit object globalLogger extends Console()
  }
  class Console() extends Logger{
    def exception(t: Throwable): Unit = t.printStackTrace()

    def debug(t: Text[Any])(implicit f: File, line: Line): Unit = {
      println(f.value.split('/').last + ":" + line + " " + t.source + " " + pprint.apply(t.value))
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy