boulder/ra
Jacob Hoffman-Andrews dd1c52573e
log: allow logging to stdout/stderr instead of syslog (#6307)
Right now, Boulder expects to be able to connect to syslog, and panics
if it's not available. We'd like to be able to log to stdout/stderr as a
replacement for syslog.

- Add a detailed timestamp (down to microseconds, same as we collect in
prod via syslog).
- Remove the escape codes for colorizing output.
- Report the severity level numerically rather than with a letter prefix.

Add locking for stdout/stderr and syslog logs. Neither the [syslog] package
nor the [os] package document concurrency-safety, and the Go rule is: if
it's not documented to be concurrent-safe, it's not. Notably the [log.Logger]
package is documented to be concurrent-safe, and a look at its implementation
shows it uses a Mutex internally.

Remove places that use the singleton `blog.Get()`, and instead pass through
a logger from main in all the places that need it.

[syslog]: https://pkg.go.dev/log/syslog
[os]: https://pkg.go.dev/os
[log.Logger]: https://pkg.go.dev/log#Logger
2022-08-29 06:19:22 -07:00
..
proto ra: add GenerateOCSP (#6192) 2022-06-27 16:04:42 -07:00
mock_test.go ra: check failed authorizations limit before attempting authz reuse (#5827) 2021-12-03 14:35:58 -08:00
ra.go Add unparam linter to CI (#6312) 2022-08-23 12:37:24 -07:00
ra_test.go log: allow logging to stdout/stderr instead of syslog (#6307) 2022-08-29 06:19:22 -07:00