make EventHandler non-global

- add Logging trait for nicer interface
- add EventHandlerLogging class for offering the nice interface from
  app.log
- add eventHandler instance to app and use that for all internal logging
  (this means that some places (dispatchers, remoting) were infiltrated
  by app just to do logging, but I think we'll need app in there soon
  enough for other reasons)
This commit is contained in:
Roland 2011-10-13 13:16:41 +02:00
parent e25ee9f0e2
commit 85b7accfd4
61 changed files with 590 additions and 542 deletions

View file

@ -108,9 +108,9 @@ object Pi extends App {
master.?(Calculate, Timeout(60000)).
await.resultOrException match { //wait for the result, with a 60 seconds timeout
case Some(pi)
EventHandler.info(this, "\n\tPi estimate: \t\t%s\n\tCalculation time: \t%s millis".format(pi, (now - start)))
app.eventHandler.info(this, "\n\tPi estimate: \t\t%s\n\tCalculation time: \t%s millis".format(pi, (now - start)))
case None
EventHandler.error(this, "Pi calculation did not complete within the timeout.")
app.eventHandler.error(this, "Pi calculation did not complete within the timeout.")
}
}
}