mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_udp: use log crate instead of eprintln, add LogLevel to Config
This commit is contained in:
parent
dd19f32a2a
commit
f4187f4368
6 changed files with 19 additions and 9 deletions
|
|
@ -108,14 +108,14 @@ pub fn gather_and_print_statistics(
|
|||
let num_peers = (torrent.num_seeders + torrent.num_leechers) as u64;
|
||||
|
||||
if let Err(err) = peers_per_torrent.increment(num_peers){
|
||||
eprintln!("error incrementing peers_per_torrent histogram: {}", err)
|
||||
::log::error!("error incrementing peers_per_torrent histogram: {}", err)
|
||||
}
|
||||
}
|
||||
for torrent in torrents.ipv6.values(){
|
||||
let num_peers = (torrent.num_seeders + torrent.num_leechers) as u64;
|
||||
|
||||
if let Err(err) = peers_per_torrent.increment(num_peers){
|
||||
eprintln!("error incrementing peers_per_torrent histogram: {}", err)
|
||||
::log::error!("error incrementing peers_per_torrent histogram: {}", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue