Currently the output of Currant is hard-coded to look like this:
SYSTEM: starting process app1
app1: (output here)
app1: process exited with status: 0
It would be nice if the caller could configure it to look for example like this (assuming we run "make start" in a subshell):
app1: make start
app1: (output here)
app1 success
The API could use the existing String formatting facilities of Rust, in particular named parameters:
let mut runner = Runner::new();
// configure output of a line for all commands
// name and line are known to Currant
// line is a line of output from the subshell
runner.lineTemplate("{name}: {line}");
let command_str = "make start";
let mut cmd = ConsoleCommand::from_string(name, command_str).unwrap();
// override message before Currant starts this specific command
cmd.startTemplate("{name} {}", command_str);
// configure message when any task exits with code 0
runner.successTemplate("{name} success");
// configure message when any task exits with non-zero code
runner.failureTemplate("{name} failed, error code {exit_code}");
Currently the output of Currant is hard-coded to look like this:
It would be nice if the caller could configure it to look for example like this (assuming we run "make start" in a subshell):
The API could use the existing String formatting facilities of Rust, in particular named parameters: