Closed charlierudolph closed 7 years ago
I think we'll still need to logger for logging things like exo clean removing test containers
or something, we can simply pipe the docker-compose output to the logger without parsing it.
This might mess up the indentation though - I'm not sure how important that is.
That would be a banner row to me which separates calls to child processes). Another example would be for exo run
which has four sections docker-compose pull
, docker-compose build
, docker-compose up
, and docker-compose down
See printHeader
in src/cmd/template
for an example of what I am considering a banner row
For breaking this up lets do this one command at a time.
exo clean
from the start of each lineexo deploy
from the start of each linePass in an io.Writer
instead of a logger and use fmt.Fprint
and assign child process stdout / stderr to it
When you say pipe the output directly do you mean use this simplified logger which takes in io.Writer
and uses fmt.Fprint
?
For pipe the output directly
I mean we will switch from using go-execplus and instead be using the ordinary exec
. When you create a Cmd
instance, you can assign as io.Writer to Stdout
and Stderr
https://golang.org/pkg/os/exec/#Cmd
When do we decide to switch from go-execplus to exec? Didn't we mostly use go-execplus for monitoring online text? Does that mean we won't need go-execplus either?
I don't think we'll need go-execplus in the source code anymore, but will continue to use it in the exosphere tests. Please start with exo clean / exo deploy since those don't touch online text. Lets not cleanup the output in exo run / exo test until #698 is done
docker-compose up
cli option: --abort-on-container-exit
https://docs.docker.com/compose/reference/up/. That way we let up
run until the test container exits and thus can pipe all output directly to stdout
Stop parsing the docker compose output and instead just output it directly. With #698, we shouldn't be injecting any more output into the
docker-compose up
process.For other processes, like
exo clean
andexo deploy
, output the child command directly (this will probably mean stop usinggo-execplus
) and instead only add banner rows to signify that something is being run.This may result in a complete removal of the logger.
@alexdavid @hugobho please review