mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-27 09:18:00 +00:00
Hide unknown messages in production (#275)
This commit is contained in:
@@ -154,10 +154,13 @@ impl StreamHandler<ws::Message, ws::ProtocolError> for NodeConnector {
|
||||
// info!("New node message: {}", std::str::from_utf8(&data).unwrap_or_else(|_| "INVALID UTF8"));
|
||||
self.handle_message(msg, data, ctx)
|
||||
},
|
||||
#[cfg(debug)]
|
||||
Err(err) => {
|
||||
let data: &[u8] = data.get(..512).unwrap_or_else(|| &data);
|
||||
warn!("Failed to parse node message: {} {}", err, std::str::from_utf8(data).unwrap_or_else(|_| "INVALID UTF8"))
|
||||
},
|
||||
#[cfg(not(debug))]
|
||||
Err(_) => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user