concept output in category sbt

appears as: output, n output, The output, output, The output
sbt in Action

This is an excerpt from Manning's book sbt in Action.

Also, communication between tasks is hard in Ant/Maven and to a certain extent in Gradle. If you have one task that uses the output of another, you’re looking at creating an intermediate file. With sbt, each task has an output (be it a value or a file) and explicit dependencies, which means that sbt can execute tasks in parallel by default. It uses the dependency tree to ensure that tasks are executed in the right order.

Input and output

When you fork a process, you can change where the output goes to and where input is read from. You do this using the outputStrategy setting:

outputStrategy := Some(CustomOutput(new java.io.FileOutputStream("/tmp/
        run.log")))

By default, all standard output is logged to the sbt console at the Info level, and all standard errors are logged at the Error level. There are any number of options for output. Here’s how to send all output (standard out and error) to sbt standard out (not the logger):