mirror of
https://github.com/ivabus/lonelyradio
synced 2024-11-22 08:05:10 +03:00
0.1.3: add IP address to logs
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
5bfe7364c2
commit
84d4a9e65d
3 changed files with 4 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -320,7 +320,7 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lonelyradio"
|
name = "lonelyradio"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lonelyradio"
|
name = "lonelyradio"
|
||||||
description = "TCP radio for singles"
|
description = "TCP radio for singles"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = [ "Ivan Bushchik <ivabus@ivabus.dev>" ]
|
authors = [ "Ivan Bushchik <ivabus@ivabus.dev>" ]
|
||||||
|
|
|
@ -58,9 +58,10 @@ async fn stream(mut s: TcpStream) {
|
||||||
'track: loop {
|
'track: loop {
|
||||||
let track = pick_track(&tracklist);
|
let track = pick_track(&tracklist);
|
||||||
println!(
|
println!(
|
||||||
"[{}] {} to {}",
|
"[{}] {} to {}:{}",
|
||||||
Local::now().to_rfc3339(),
|
Local::now().to_rfc3339(),
|
||||||
track.to_str().unwrap(),
|
track.to_str().unwrap(),
|
||||||
|
s.peer_addr().unwrap().ip().to_string(),
|
||||||
s.peer_addr().unwrap().port()
|
s.peer_addr().unwrap().port()
|
||||||
);
|
);
|
||||||
let file = Box::new(std::fs::File::open(track).unwrap());
|
let file = Box::new(std::fs::File::open(track).unwrap());
|
||||||
|
|
Loading…
Reference in a new issue