mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-25 07:29:32 -05:00
Avoid local variables if not necessary
We can initialize the env filter without `format!` when the variables are not used anywhere else.
This commit is contained in:
parent
c01cccb288
commit
96c87bca71
@ -7,16 +7,8 @@ use tracing::subscriber::DefaultGuard;
|
|||||||
/// let _guard = init_tracing();
|
/// let _guard = init_tracing();
|
||||||
/// ```
|
/// ```
|
||||||
pub fn init_tracing() -> DefaultGuard {
|
pub fn init_tracing() -> DefaultGuard {
|
||||||
let global_filter = tracing::Level::WARN;
|
|
||||||
let test_filter = tracing::Level::DEBUG;
|
|
||||||
let monero_harness_filter = tracing::Level::DEBUG;
|
|
||||||
let monero_rpc_filter = tracing::Level::DEBUG;
|
|
||||||
|
|
||||||
use tracing_subscriber::util::SubscriberInitExt as _;
|
use tracing_subscriber::util::SubscriberInitExt as _;
|
||||||
tracing_subscriber::fmt()
|
tracing_subscriber::fmt()
|
||||||
.with_env_filter(format!(
|
.with_env_filter("warn,test=debug,monero_harness=debug,monero_rpc=debug")
|
||||||
"{},test={},monero_harness={},monero_rpc={}",
|
|
||||||
global_filter, test_filter, monero_harness_filter, monero_rpc_filter,
|
|
||||||
))
|
|
||||||
.set_default()
|
.set_default()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user