juju-solutions / charmguardian

Testing tool for Juju charm, bundles, and charm/bundle merge proposals.
3 stars 3 forks source link

--debug suppresses stderror output in json #10

Closed abentley closed 10 years ago

abentley commented 10 years ago

When --debug is supplied, the stderror is not captured to be included in json. Instead, it is emitted as charmguardian's own standard error. But stderror is needed in both places; it's needed in the charmguardian output so that issues can be diagnosed at runtime, and it's needed in the json so that issues can be diagnosed after runtime (end-users should never need to visit Jenkins).

This sort of thing can be done-- /usr/bin/tee both emits output and writes it to a file, for example. In fact, tee could potentially be used as part of the solution to this.