Rocket
Rocket copied to clipboard
Test logging output
Inspired by #1505, Rocket's testing suite should be checking that we log what we expect. In particular, that warnings and errors are emitted, at run-time, when desired. Furthermore, we should cross-check any log output in the guide with the actual output.
To accomplish this, we'd minimally need to start a new process, capturing stdout and stderr, and launch the server in the process in such a way that it doesn't run infinitely.
As a note, once #21 is resolved, we should enable installing custom subscribers through Rocket<Build>
. Then, hopefully, we can install a subscriber that buffers log output and use it for comparison against an expected value.
For posterity: this might not actually give us the semantics we want. Several logging issues have occurred because there was no logger installed. Installing one would, of course, lead to such issues continuing to go undetected.