remove owo colors
This commit is contained in:
@@ -256,8 +256,8 @@ impl ConnectionManager {
|
||||
|
||||
log_net!(
|
||||
"== get_or_create_connection local_addr={:?} dial_info={:?}",
|
||||
local_addr.green(),
|
||||
dial_info.green()
|
||||
local_addr,
|
||||
dial_info
|
||||
);
|
||||
|
||||
// Kill off any possibly conflicting connections
|
||||
@@ -273,8 +273,8 @@ impl ConnectionManager {
|
||||
{
|
||||
log_net!(
|
||||
"== Returning existing connection local_addr={:?} peer_address={:?}",
|
||||
local_addr.green(),
|
||||
peer_address.green()
|
||||
local_addr,
|
||||
peer_address
|
||||
);
|
||||
|
||||
return Ok(NetworkResult::Value(conn));
|
||||
@@ -300,8 +300,8 @@ impl ConnectionManager {
|
||||
{
|
||||
log_net!(
|
||||
"== Returning existing connection in race local_addr={:?} peer_address={:?}",
|
||||
local_addr.green(),
|
||||
peer_address.green()
|
||||
local_addr,
|
||||
peer_address
|
||||
);
|
||||
|
||||
return Ok(NetworkResult::Value(conn));
|
||||
|
@@ -45,7 +45,7 @@ impl NetworkManager {
|
||||
let out_data: Vec<u8> = network_result_value_or_log!(self
|
||||
.net()
|
||||
.send_recv_data_unbound_to_dial_info(dial_info, data, timeout_ms)
|
||||
.await? =>
|
||||
.await? => [ format!(": dial_info={}, data.len={}", dial_info, data.len()) ]
|
||||
{
|
||||
return Ok(Vec::new());
|
||||
});
|
||||
|
@@ -845,7 +845,7 @@ impl NetworkManager {
|
||||
}
|
||||
|
||||
/// Called by the RPC handler when we want to issue an direct receipt
|
||||
#[instrument(level = "trace", skip(self, rcpt_data), err)]
|
||||
#[instrument(level = "debug", skip(self, rcpt_data), err)]
|
||||
pub async fn send_out_of_band_receipt(
|
||||
&self,
|
||||
dial_info: DialInfo,
|
||||
@@ -858,11 +858,10 @@ impl NetworkManager {
|
||||
// should not be subject to our ability to decode it
|
||||
|
||||
// Send receipt directly
|
||||
log_net!(debug "send_out_of_band_receipt: dial_info={}", dial_info);
|
||||
network_result_value_or_log!(self
|
||||
.net()
|
||||
.send_data_unbound_to_dial_info(dial_info, rcpt_data)
|
||||
.await? => {
|
||||
.await? => [ format!(": dial_info={}, rcpt_data.len={}", dial_info, rcpt_data.len()) ] {
|
||||
return Ok(());
|
||||
}
|
||||
);
|
||||
@@ -928,13 +927,13 @@ impl NetworkManager {
|
||||
|
||||
// Is this a direct bootstrap request instead of an envelope?
|
||||
if data[0..4] == *BOOT_MAGIC {
|
||||
network_result_value_or_log!(self.handle_boot_request(connection_descriptor).await? => {});
|
||||
network_result_value_or_log!(self.handle_boot_request(connection_descriptor).await? => [ format!(": connection_descriptor={:?}", connection_descriptor) ] {});
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
// Is this an out-of-band receipt instead of an envelope?
|
||||
if data[0..3] == *RECEIPT_MAGIC {
|
||||
network_result_value_or_log!(self.handle_out_of_band_receipt(data).await => {});
|
||||
network_result_value_or_log!(self.handle_out_of_band_receipt(data).await => [ format!(": data.len={}", data.len()) ] {});
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
@@ -1040,7 +1039,7 @@ impl NetworkManager {
|
||||
log_net!(debug "failed to forward envelope: {}" ,e);
|
||||
return Ok(false);
|
||||
}
|
||||
} => {
|
||||
} => [ format!(": relay_nr={}, data.len={}", relay_nr, data.len()) ] {
|
||||
return Ok(false);
|
||||
}
|
||||
);
|
||||
|
@@ -515,7 +515,8 @@ impl Network {
|
||||
network_result_value_or_log!(ph.clone()
|
||||
.send_message(data.clone(), peer_socket_addr)
|
||||
.await
|
||||
.wrap_err("sending data to existing conection")? => { return Ok(Some(data)); } );
|
||||
.wrap_err("sending data to existing conection")? => [ format!(": data.len={}, descriptor={:?}", data.len(), descriptor) ]
|
||||
{ return Ok(Some(data)); } );
|
||||
|
||||
// Network accounting
|
||||
self.network_manager()
|
||||
|
@@ -92,7 +92,7 @@ impl DiscoveryContext {
|
||||
);
|
||||
return None;
|
||||
}
|
||||
} => {
|
||||
} => [ format!(": node_ref={}", node_ref) ] {
|
||||
return None;
|
||||
}
|
||||
);
|
||||
|
@@ -28,7 +28,7 @@ impl RawUdpProtocolHandler {
|
||||
|
||||
// Check length of reassembled message (same for all protocols)
|
||||
if message.len() > MAX_MESSAGE_SIZE {
|
||||
log_net!(debug "{}({}) at {}@{}:{}", "Invalid message".green(), "received too large UDP message", file!(), line!(), column!());
|
||||
log_net!(debug "{}({}) at {}@{}:{}", "Invalid message", "received too large UDP message", file!(), line!(), column!());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -236,7 +236,7 @@ impl NetworkConnection {
|
||||
Box::pin(async move {
|
||||
log_net!(
|
||||
"== Starting process_connection loop for id={}, {:?}", connection_id,
|
||||
descriptor.green()
|
||||
descriptor
|
||||
);
|
||||
|
||||
let network_manager = connection_manager.network_manager();
|
||||
@@ -249,7 +249,7 @@ impl NetworkConnection {
|
||||
let new_timer = || {
|
||||
sleep(connection_manager.connection_inactivity_timeout_ms()).then(|_| async {
|
||||
// timeout
|
||||
log_net!("== Connection timeout on {:?}", descriptor.green());
|
||||
log_net!("== Connection timeout on {:?}", descriptor);
|
||||
RecvLoopAction::Timeout
|
||||
})
|
||||
};
|
||||
@@ -306,7 +306,7 @@ impl NetworkConnection {
|
||||
log_net!(debug "Connection closed from: {} ({})", peer_address.socket_address().to_socket_addr(), peer_address.protocol_type());
|
||||
return RecvLoopAction::Finish;
|
||||
}
|
||||
let mut message = network_result_value_or_log!(v => {
|
||||
let mut message = network_result_value_or_log!(v => [ format!(": protocol_connection={:?}", protocol_connection) ] {
|
||||
return RecvLoopAction::Finish;
|
||||
});
|
||||
|
||||
@@ -366,7 +366,7 @@ impl NetworkConnection {
|
||||
|
||||
log_net!(
|
||||
"== Connection loop finished descriptor={:?}",
|
||||
descriptor.green()
|
||||
descriptor
|
||||
);
|
||||
|
||||
// Let the connection manager know the receive loop exited
|
||||
|
@@ -18,4 +18,4 @@ use super::*;
|
||||
#[archive_attr(repr(C), derive(CheckBytes))]
|
||||
pub struct DialInfoTCP {
|
||||
pub socket_address: SocketAddress,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user