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:
parent
e25ee9f0e2
commit
85b7accfd4
61 changed files with 590 additions and 542 deletions
|
|
@ -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.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue