in ascending order of how easy they are to guess
additions/corrections welcome
- paulproteus = Asheesh Laroia = @asheeshlaroia
trait WithContext { | |
var ctx = null | |
def setContext(c:Context): Unit = if (ctx == null) { | |
ctx = c | |
} else { | |
sys.error("already set") | |
} | |
def fromContext[T](k:String):T = if (ctx == null) { | |
sys.error("premature access") | |
} else { |
/* RetroLogger.scala | |
* | |
* A handy sbt-0.10.x plugin that allows you to set the log level like in the | |
* old days (AKA sbt-0.7.x). | |
* | |
* It works by creating aliases of this form: | |
* "set logLevel := Level.Debug" ====> "debug" | |
* | |
* Installation: | |
* - mkdir -p ~/.sbt/plugins/ |
in ascending order of how easy they are to guess
additions/corrections welcome