mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-30 12:36:36 -05:00
Improve time formatting of log output
Previously, the time was formatted as ISO8601 timestamps which is barely readable by humans. Activating the `chrono` feature allows us to format with a different format string. The output now looks like this: 2021-03-01 11:59:52 DEBUG Database and seed will be stored in /home/thomas/.local/share/xmr-btc-swap 2021-03-01 11:59:52 DEBUG Starting monero-wallet-rpc on port 40673 2021-03-01 11:59:59 DEBUG Still got 0.00009235 BTC left in wallet, swapping ... 2021-03-01 11:59:59 DEBUG Dialing alice at 12D3KooWCdMKjesXMJz1SiZ7HgotrxuqhQJbP5sgBm2BwP1cqThi 2021-03-01 11:59:59 DEBUG Requesting quote for 0.00008795 BTC There is a double space after the time which is already fixed in tracing-subscriber but not yet released. See https://github.com/tokio-rs/tracing/issues/1271.
This commit is contained in:
parent
a82e82edd5
commit
f4827e3fa4
3 changed files with 19 additions and 3 deletions
|
|
@ -52,6 +52,9 @@ async fn main() -> Result<()> {
|
|||
.with_writer(std::io::stderr)
|
||||
.with_ansi(is_terminal)
|
||||
.with_target(false)
|
||||
.with_timer(tracing_subscriber::fmt::time::ChronoLocal::with_format(
|
||||
"%F %T".to_owned(),
|
||||
))
|
||||
.finish();
|
||||
|
||||
tracing::subscriber::set_global_default(subscriber)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue