Changed log to tracing

This commit is contained in:
Igor Katson 2023-11-19 12:50:11 +00:00
parent db12bba7a6
commit 48a14823fa
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
26 changed files with 321 additions and 689 deletions

View file

@ -7,7 +7,7 @@ use dht::{Dht, DhtStats};
use http::StatusCode;
use librqbit_core::id20::Id20;
use librqbit_core::torrent_metainfo::TorrentMetaV1Info;
use log::warn;
use tracing::{warn, info};
use parking_lot::RwLock;
use serde::{Deserialize, Serialize};
use std::net::SocketAddr;
@ -110,7 +110,7 @@ impl HttpApi {
.route("/torrents/:id/stats", get(torrent_stats))
.with_state(state);
log::info!("starting HTTP server on {}", addr);
info!("starting HTTP server on {}", addr);
axum::Server::try_bind(&addr)
.with_context(|| format!("error binding to {addr}"))?
.serve(app.into_make_service())