cnabio / cnab-go

A Go implementation of CNAB Core 1.0
MIT License
69 stars 37 forks source link

Allow caller to control driver logging #149

Open astrieanna opened 5 years ago

astrieanna commented 5 years ago

CLIs that use cnab-go should be able to:

  1. Control whether any output is written
  2. Control whether output is written to stdout or stderr
  3. Capture all output (i.e. to store logs for future reference)
  4. Get logs from all the code in the driver (i.e. SetConfig should be able to write logs, too)
  5. Separate logs from the invocation image from logs from the driver (very important for UX)
  6. Control verbosity of the driver logging

This is related to:

Currently, the caller can set stdout and stderr streams in the Operation, which allows the caller to control whether output is written, whether it's written to stdout/stderr, and to capture the output. It does not allow logging from SetConfig. There are not enough tests to ensure that the logging is consistently done only to the Operation streams.

Some possible approaches:

cc @youreddy @silvin-lubecki

carolynvs commented 3 years ago

I recently fixed the docker driver in #234. It would be great to be able to separate out driver logs and the output of the bundle as well though. 👍