Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

dmcardle
Copy link

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
Copy link
Owner

xvzcf commented Mar 24, 2021

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
Copy link
Author

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
Copy link
Collaborator

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

@xvzcf
Copy link
Owner

xvzcf commented Mar 24, 2021

Agreed.

@dmcardle
Copy link
Author

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

@xvzcf
Copy link
Owner

xvzcf commented Mar 24, 2021

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
Copy link
Author

Yep, we're in agreement!

@dmcardle dmcardle closed this Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants