Skip to content

Commit

Permalink
kble: trace log of forwarding bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobkaz committed May 9, 2024
1 parent 60c349b commit 813e14b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kble/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::{Context, Result};
use futures::{future, SinkExt, StreamExt};
use std::collections::HashMap;
use tokio::sync::broadcast;
use tracing::{debug, warn};
use tracing::{debug, warn, trace};

struct Connection {
backend: plug::Backend,
Expand Down Expand Up @@ -207,10 +207,12 @@ impl<'a> Link<'a> {
Ok(data) => data,
};

let data_len = data.len();
if let Err(e) = self.dest.send(data).await {
warn!("Error writing to {}: {}", self.dest_name, e);
break;
}
trace!("{} -> {}: {} bytes", self.source_name, self.dest_name, data_len);
}
self
}
Expand Down

0 comments on commit 813e14b

Please sign in to comment.