boulder/ca
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 Standardize on 'shardIdx' to identify crl shards (#6263) 2022-08-02 13:21:26 -07:00
testdata Remove unused testdata files (#5804) 2021-11-17 17:12:25 -08:00
ca.go Add unparam linter to CI (#6312) 2022-08-23 12:37:24 -07:00
ca_test.go log: allow logging to stdout/stderr instead of syslog (#6307) 2022-08-29 06:19:22 -07:00
crl.go CRL: Improve shard identification in error messages (#6306) 2022-08-23 12:35:00 -07:00
crl_test.go Disallow affiliationChanged revocation reason (#6217) 2022-07-07 10:45:36 -07:00
ecdsa_allow_list.go Update yaml from v2.4.0 to v3.0.1 (#6146) 2022-06-14 13:53:58 -07:00
ecdsa_allow_list_test.go CA: Deprecate field ECDSAAllowedAccounts (#5477) 2021-06-11 12:13:01 -07:00
ocsp.go Add unparam linter to CI (#6312) 2022-08-23 12:37:24 -07:00
ocsp_test.go ocsp: log revocation reason code (#6228) 2022-08-01 12:53:17 -07:00