mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-16 18:20:45 -04:00
feat(swap): show min deposit required for min_quantity
This commit is contained in:
parent
293cbb68d6
commit
dc706c584a
4 changed files with 55 additions and 22 deletions
|
@ -16,7 +16,8 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef<Path>, swap_id: Option<Uuid
|
|||
|
||||
let registry = Registry::default().with(level_filter);
|
||||
|
||||
let appender = tracing_appender::rolling::never(dir, format!("swap-{}.log", swap_id));
|
||||
let appender =
|
||||
tracing_appender::rolling::never(dir.as_ref(), format!("swap-{}.log", swap_id));
|
||||
let (appender, guard) = tracing_appender::non_blocking(appender);
|
||||
|
||||
std::mem::forget(guard);
|
||||
|
@ -38,8 +39,6 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef<Path>, swap_id: Option<Uuid
|
|||
} else {
|
||||
set_global_default(file_logger.with(info_terminal_printer()))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
} else {
|
||||
let level = if debug { Level::DEBUG } else { Level::INFO };
|
||||
let is_terminal = atty::is(atty::Stream::Stderr);
|
||||
|
@ -56,9 +55,10 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef<Path>, swap_id: Option<Uuid
|
|||
} else {
|
||||
builder.init();
|
||||
}
|
||||
};
|
||||
|
||||
Ok(())
|
||||
}
|
||||
tracing::info!("Logging initialized to {}", dir.as_ref().display());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub struct StdErrPrinter<L> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue