boulder/log
Daniel McCarney eb4445be6c
log: panic if bothWriter write to stdout errs. (#4491)
If we can't write to stdout we prefer to panic immediately rather than
potentially lose logs we capture from redirecting stdout as a syslog backup.

A unit test is included to verify the panic behaviour. Prior to the `log` diff
in this branch the test failed because the non-nil `err` result from
`fmt.Printf` was being away:

```
=== RUN   TestStdoutFailure
=== PAUSE TestStdoutFailure
=== CONT  TestStdoutFailure
FAIL	github.com/letsencrypt/boulder/log	0.011s
FAIL
```

After the `log` package diff in this branch is applied the test passes.

I additionally tested this end-to-end by redirecting stdout to a full
filesystem volume mounted into the Boulder docker image. It provoked the
expected panic when a component tried to write to stdout and the filesystem was
full.
2019-10-18 13:53:00 -04:00
..
log.go log: panic if bothWriter write to stdout errs. (#4491) 2019-10-18 13:53:00 -04:00
log_test.go log: panic if bothWriter write to stdout errs. (#4491) 2019-10-18 13:53:00 -04:00
mock.go Spelling (#2500) 2017-01-16 10:44:52 -05:00