mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-24 22:19:37 -04:00
refactor: remove unused functions in swap/src/common/tracing_util.rs
This commit is contained in:
parent
1c5acdc1c7
commit
dc865a91f3
1 changed files with 0 additions and 45 deletions
|
@ -190,20 +190,6 @@ pub fn init(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function controls which crate's logs actually get logged and from which level.
|
|
||||||
fn env_filter(level_filter: LevelFilter, crates: Vec<&str>) -> Result<EnvFilter> {
|
|
||||||
let mut filter = EnvFilter::from_default_env();
|
|
||||||
|
|
||||||
// Add directives for each crate in the provided list
|
|
||||||
for crate_name in crates {
|
|
||||||
filter = filter.add_directive(Directive::from_str(&format!(
|
|
||||||
"{}={}",
|
|
||||||
crate_name, &level_filter
|
|
||||||
))?);
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(filter)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This function controls which crate's logs actually get logged and from which level, with info-level crates at INFO level or higher.
|
/// This function controls which crate's logs actually get logged and from which level, with info-level crates at INFO level or higher.
|
||||||
fn env_filter_with_info_crates(
|
fn env_filter_with_info_crates(
|
||||||
|
@ -228,37 +214,6 @@ fn env_filter_with_info_crates(
|
||||||
Ok(filter)
|
Ok(filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function controls which crate's logs actually get logged and from which level, with libp2p crates at INFO level or higher.
|
|
||||||
fn env_filter_with_libp2p_info(
|
|
||||||
level_filter: LevelFilter,
|
|
||||||
our_crates: Vec<&str>,
|
|
||||||
libp2p_crates: Vec<&str>,
|
|
||||||
tor_crates: Vec<&str>,
|
|
||||||
) -> Result<EnvFilter> {
|
|
||||||
let mut filter = EnvFilter::from_default_env();
|
|
||||||
|
|
||||||
// Add directives for each crate in the provided list
|
|
||||||
for crate_name in our_crates {
|
|
||||||
filter = filter.add_directive(Directive::from_str(&format!(
|
|
||||||
"{}={}",
|
|
||||||
crate_name, &level_filter
|
|
||||||
))?);
|
|
||||||
}
|
|
||||||
|
|
||||||
for crate_name in libp2p_crates {
|
|
||||||
filter = filter.add_directive(Directive::from_str(&format!("{}=INFO", crate_name))?);
|
|
||||||
}
|
|
||||||
|
|
||||||
for crate_name in tor_crates {
|
|
||||||
filter = filter.add_directive(Directive::from_str(&format!(
|
|
||||||
"{}={}",
|
|
||||||
crate_name, &level_filter
|
|
||||||
))?);
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(filter)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// This function controls which crate's logs actually get logged and from which level, including all crate categories.
|
/// This function controls which crate's logs actually get logged and from which level, including all crate categories.
|
||||||
fn env_filter_with_all_crates(
|
fn env_filter_with_all_crates(
|
||||||
level_filter: LevelFilter,
|
level_filter: LevelFilter,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue