mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-05 04:54:36 -04:00
Use tracing-log
feature flag instead of manual initialization
This also formats `log` events more nicely. Instead of ``` Mar 29 09:46:16.775 INFO log: Found message after comparing 82 lines log.target="testcontainers::core::wait_for_message" log.module_path="testcontainers::core::wait_for_message" log.file="/home/thomas/.cargo/registry/src/github.com-1ecc6299db9ec823/testcontainers-0.12.0/src/core/wait_for_message.rs" log.line=35 ``` We now have ``` Mar 29 09:57:15.860 INFO testcontainers::core::wait_for_message: Found message after comparing 81 lines ```
This commit is contained in:
parent
c5827f84ca
commit
c01cccb288
6 changed files with 3 additions and 22 deletions
|
@ -1,5 +1,4 @@
|
|||
use anyhow::Result;
|
||||
use tracing_log::LogTracer;
|
||||
use tracing_subscriber::filter::LevelFilter;
|
||||
use tracing_subscriber::FmtSubscriber;
|
||||
|
||||
|
@ -8,9 +7,6 @@ pub fn init_tracing(level: LevelFilter) -> Result<()> {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
// We want upstream library log messages, just only at Info level.
|
||||
LogTracer::init_with_filter(tracing_log::log::LevelFilter::Info)?;
|
||||
|
||||
let is_terminal = atty::is(atty::Stream::Stderr);
|
||||
|
||||
let builder = FmtSubscriber::builder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue