xvzcf / tls-interop-runner

Interoperability testing of TLS implementations.
Other
10 stars 13 forks source link

Log output from docker-compose in verbose mode. #46

Closed dmcardle closed 3 years ago

dmcardle commented 3 years ago

Are we committed to logging? I see that we call log.SetFlags(0), so logging is not substantially different from printing to stdout.

If we don't care about logging, this patch could be even simpler — we could drop the logWriter struct and set the cmd's stdout/stderr handles to os.Stdout/os.Stderr.

xvzcf commented 3 years ago

I'm thinking of doing away with verboseMode, having a logger write detailed information at each step of the process (including the outputs of the docker-compose commands) to a file in the test output directory, and keeping (perhaps slightly improving) the current success/failure response to stdout/stderr.

This detailed run-log might help during debugging and can also be persisted to the backing store as part of each run.

Thoughts? (you or anyone else reading this)

dmcardle commented 3 years ago

If you're getting rid of verboseMode and always logging verbosely, how about adding a logToStdout flag?

It would be great to cut out the extra step of hunting down the log file.

cjpatton commented 3 years ago

+1 to @dmcardle. It's helpful to be able to see the output of docker-compose during building.

xvzcf commented 3 years ago

Agreed.

dmcardle commented 3 years ago

Feel free to close this without merging if you're going another direction with logging :)

xvzcf commented 3 years ago

Feel free to close this without merging if you're going another direction with logging :)

We're all in agreement about the direction though, right? If so I'll add this to my TODO list.

dmcardle commented 3 years ago

Yep, we're in agreement!