Skip to content

Commit

Permalink
feat: log stream end secs (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored Nov 7, 2023
2 parents 52b4a12 + b26e746 commit 5b82703
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rs/packages/stream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,9 +641,11 @@ impl Drop for StreamConnectionDropper {
let duration_ms = start_time.elapsed().unwrap().as_millis() as u64;
let now = DateTime::now();


{
let s = duration_ms as f64 / 1_000.0;
let end_reason = end_reason.lock();
info!("END conn {id} {ip} - station: {station_id} ({station_name}) | reason={end_reason}");
info!("END conn {id} {ip} - station: {station_id} ({station_name}) | reason={end_reason} - {s} s");
}

tokio::spawn(async move {
Expand Down

0 comments on commit 5b82703

Please sign in to comment.