Speed up logging once again (#9981)

* Update `tracing`-related dependencies

* Enable `parking_lot` feature in `tracing-subscriber`

* Add an asynchronous stderr logger

* Make clippy happy

* Add an integration test for the logger

* Refactor `test_logger_filters`'s subprocess machinery into a separate function

* Use a child process instead of hooking into stderr for the test

* Add a doc comment for `MakeStderrWriter`

* Move the initialization into the `MakeStderrWriter`'s constructor

* Add an extra test case to trigger the logger's emergency flush mechanism

* Use the buffer's mutex for asynchronous flushes

* Remove vestigial `nix` dependency from one of the previous commits
This commit is contained in:
Koute
2021-10-22 01:54:15 +09:00
committed by GitHub
parent 6334692e9c
commit 3d5f093ddb
6 changed files with 373 additions and 21 deletions
@@ -109,5 +109,5 @@ pub(crate) fn set_reload_handle(handle: Handle<EnvFilter, SCSubscriber>) {
type SCSubscriber<
N = tracing_fmt::format::DefaultFields,
E = crate::logging::EventFormat,
W = fn() -> std::io::Stderr,
W = crate::logging::DefaultLogger,
> = layer::Layered<tracing_fmt::Layer<Registry, N, E, W>, Registry>;