implicit.ly

Scala software, hot off the presses

loglady 1.0.0

This is the first public release of loglady, a very simple logging trait with an API similar to Python's logging library.

Example:

class MyClass extends Logging {

  log.warn("We all float (%.4f) down here", 3.141592)
  log.debug("Some random stuff: %d %s %x", 42, List(0, 1, 1, 2, 3, 5), -559038737)
  log.error("Formatted date: %1$tm %1$te,%1$tY", new java.util.Date)

  try {
    throw new Exception("Oops!")
  } catch {
    case exc: Exception => {
      log.error(exc, "Something bad happened")
    }
  }
}

loglady is a crazy simple logging API for Scala, wrapping slf4j.

Filed under  //   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0-1   Scala 2.9.1   loglady   org.eintr.loglady  
Posted January 23, 2012 by dln