Skip to content

Commit

Permalink
Switched to use Configgy for logging, added logging config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jboner committed Oct 10, 2008
1 parent 2fda906 commit 3e62ba3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Expand Up @@ -5,8 +5,6 @@

package scala.actors.behavior

import org.slf4j.{Logger, LoggerFactory}

import scala.actors._
import scala.actors.Actor._

Expand Down
7 changes: 5 additions & 2 deletions behavior/src/main/scala/scala/actors/behavior/Helpers.scala
Expand Up @@ -10,15 +10,18 @@ import java.util.concurrent.locks.ReentrantReadWriteLock
import scala.actors._
import scala.actors.Actor._

import org.slf4j.{Logger, LoggerFactory}
import net.lag.logging.{Logger, Config}

class SystemFailure(cause: Throwable) extends RuntimeException(cause)

/**
* Base trait for all classes that wants to be able use the logging infrastructure.
*
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>
*/
trait Logging {
val log = LoggerFactory.getLogger(this.getClass)
Config.config // To make sure config system is bootstrapped
@transient val log = Logger.get(this.getClass.getName)
}

/**
Expand Down
13 changes: 13 additions & 0 deletions scala-otp.conf
@@ -0,0 +1,13 @@
<log>
#filename = "./scala-otp.log"
roll = "daily" # Options: never, hourly, daily, sunday/monday/...
level = "debug" # Options: fatal, critical, error, warning, info, debug, trace
console = on
# syslog_host = ""
# syslog_server_name = ""
# <behavior>
# node = "scala.actors.behavior"
# level = "debug"
# </behavior>
</log>

0 comments on commit 3e62ba3

Please sign in to comment.