lundi 20 avril 2015

Can you access a SBT SettingKey inside a Command?

I am writing a Command and want to use the Logger in TaskStreams but this is not possible since you cannot access .value of a SettingKey in a Command. Is there some way?

def myCommand = Command.single("myCommand") {
  case (currentState, userInput) =>
    val extracted = Project.extract(currentState)
    val log = streams.value.log   <--- not allowed
    log.info("Some logging")
    currentState
}

Aucun commentaire:

Enregistrer un commentaire