trait
Logger extends AnyRef
Abstract Value Members
-
abstract
def
debug[A](msg: ⇒ A)(implicit arg0: LogWriter[A]): Unit
-
abstract
def
error[A](msg: ⇒ A)(implicit arg0: LogWriter[A]): Unit
-
abstract
def
info[A](msg: ⇒ A)(implicit arg0: LogWriter[A]): Unit
-
abstract
def
trace[A](msg: ⇒ A)(implicit arg0: LogWriter[A]): Unit
-
abstract
def
warn[A](msg: ⇒ A)(implicit arg0: LogWriter[A]): Unit
-
abstract
def
withDebug[A, B](msg: ⇒ A)(f: ⇒ B)(implicit arg0: LogWriter[A]): B
-
abstract
def
withInfo[A, B](msg: ⇒ A)(f: ⇒ B)(implicit arg0: LogWriter[A]): B
-
abstract
def
withTrace[A, B](msg: ⇒ A)(f: ⇒ B)(implicit arg0: LogWriter[A]): B
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Defines a simple logging facility.
To use simply mix in the Logging trait. The standard Show type-class instances can be imported by importing the Logging object:
For example:
Note you will need an instance of the LogWriter typeclass in implicit scope for any type you want to log. The most convenient way to construct a LogWriter is deriving it from a Show instance, but a LogWriter can be derived for more structured data, allowing for structured logging formats such as JSON.
Most commonly you may want Show[String], for which you can
import scalaz.std.string._