Fix STDOUT and STDERR direction based on Log.* calls

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire
2015-12-15 18:01:42 -08:00
parent fb916f2389
commit 06c97cfb17
12 changed files with 136 additions and 292 deletions

View File

@@ -81,11 +81,13 @@ func TestExecServer(t *testing.T) {
logReader, logWriter := io.Pipe()
log.SetDebug(true)
log.SetOutput(logWriter)
log.SetOut(logWriter)
log.SetErr(logWriter)
defer func() {
log.SetDebug(false)
log.SetOutput(os.Stderr)
log.SetOut(os.Stdout)
log.SetErr(os.Stderr)
}()
stdoutReader, stdoutWriter := io.Pipe()