Inline tracing initialization
This code snippet is so short, it might as well be inlined to give the test more control over what it wants to log.pull/383/head
parent
96c87bca71
commit
908dae3442
@ -1,14 +0,0 @@
|
|||||||
use tracing::subscriber::DefaultGuard;
|
|
||||||
|
|
||||||
/// Utility function to initialize logging in the test environment.
|
|
||||||
/// Note that you have to keep the `_guard` in scope after calling in test:
|
|
||||||
///
|
|
||||||
/// ```rust
|
|
||||||
/// let _guard = init_tracing();
|
|
||||||
/// ```
|
|
||||||
pub fn init_tracing() -> DefaultGuard {
|
|
||||||
use tracing_subscriber::util::SubscriberInitExt as _;
|
|
||||||
tracing_subscriber::fmt()
|
|
||||||
.with_env_filter("warn,test=debug,monero_harness=debug,monero_rpc=debug")
|
|
||||||
.set_default()
|
|
||||||
}
|
|
Loading…
Reference in New Issue