Skip to content

Commit 8f7bff3

Browse files
committed
Hopefully improve some debugging
1 parent 792d9db commit 8f7bff3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eventsource-client/src/event_parser.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ impl EventParser {
180180
}
181181

182182
pub fn process_bytes(&mut self, bytes: Bytes) -> Result<()> {
183-
trace!("Parsing bytes {:?}", bytes);
183+
trace!(
184+
"Parsing bytes {:?}",
185+
from_utf8(&bytes).unwrap_or("<bad utf8>")
186+
);
184187
// We get bytes from the underlying stream in chunks. Decoding a chunk has two phases:
185188
// decode the chunk into lines, and decode the lines into events.
186189
//

0 commit comments

Comments
 (0)