mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-24 06:59:36 -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();
|
||||
/// ```
|
||||
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 _;
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter(format!(
|
||||
"{},test={},monero_harness={},monero_rpc={}",
|
||||
global_filter, test_filter, monero_harness_filter, monero_rpc_filter,
|
||||
))
|
||||
.with_env_filter("warn,test=debug,monero_harness=debug,monero_rpc=debug")
|
||||
.set_default()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user