Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade some logs to make retention easier #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ impl Handler {
socket,
exit,
};
debug!("Handler Starting");
handler.start::<P>().await;
}));

Expand Down Expand Up @@ -847,7 +846,7 @@ impl Handler {
.await;
} else {
// IP's or NodeAddress don't match. Drop the session.
warn!(
debug!(
"Session has invalid ENR. Enr sockets: {:?}, {:?}. Expected: {}",
enr.udp4_socket(),
enr.udp6_socket(),
Expand Down Expand Up @@ -907,7 +906,7 @@ impl Handler {
}
}
} else {
warn!(
debug!(
node_id = %node_address.node_id, addr = %node_address.socket_addr,
"Received an authenticated header without a matching WHOAREYOU request",
);
Expand Down
13 changes: 1 addition & 12 deletions src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,7 @@ impl std::fmt::Display for ResponseBody {
write!(f, "PONG: Enr-seq: {enr_seq}, Ip: {ip:?}, Port: {port}")
}
ResponseBody::Nodes { total, nodes } => {
write!(f, "NODES: total: {total}, Nodes: [")?;
let mut first = true;
for id in nodes {
if !first {
write!(f, ", {id}")?;
} else {
write!(f, "{id}")?;
}
first = false;
}

write!(f, "]")
write!(f, "NODES: total: {total}, Nodes: {}", nodes.len())
}
ResponseBody::Talk { response } => {
write!(f, "Response: Response {}", hex::encode(response))
Expand Down
10 changes: 5 additions & 5 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ impl Service {
let id = response.id.clone();

if let Some(mut active_request) = self.active_requests.remove(&id) {
debug!(
trace!(
"Received RPC response: {} to request: {} from: {}",
response.body, active_request.request_body, active_request.contact
);
Expand Down Expand Up @@ -734,7 +734,7 @@ impl Service {
let mut current_response =
self.active_nodes_responses.remove(&id).unwrap_or_default();

debug!(
trace!(
"Nodes Response: {} of {} received",
current_response.count, total
);
Expand Down Expand Up @@ -1161,7 +1161,7 @@ impl Service {
};
let contact = active_request.contact.clone();

debug!("Sending RPC {} to node: {}", request, contact);
trace!("Sending RPC {} to node: {}", request, contact);
if self
.handler_send
.send(HandlerIn::Request(contact, Box::new(request)))
Expand Down Expand Up @@ -1304,7 +1304,7 @@ impl Service {
} => {
// The node was updated
if promoted_to_connected {
debug!("Node promoted to connected: {}", node_id);
trace!("Node promoted to connected: {}", node_id);
self.peers_to_ping.insert(node_id);
}
}
Expand All @@ -1329,7 +1329,7 @@ impl Service {
);
}
update => {
debug!("Updated {:?}", update)
trace!("Updated {:?}", update)
} // Updated ENR successfully.
}
}
Expand Down
1 change: 0 additions & 1 deletion src/socket/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl SendHandler {

// start the handler
executor.spawn(Box::pin(async move {
debug!("Send handler starting");
send_handler.start::<P>().await;
}));
(handler_send, exit_send)
Expand Down
Loading