Rocket icon indicating copy to clipboard operation
Rocket copied to clipboard

Test logging output

Open SergioBenitez opened this issue 4 years ago • 1 comments

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.

SergioBenitez avatar Jan 12 '21 22:01 SergioBenitez

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.

SergioBenitez avatar Apr 16 '21 02:04 SergioBenitez