fix: Reduce logging verbosity even more.

This commit is contained in:
iphydf 2022-02-06 03:32:01 +00:00
parent fedcdea95a
commit 79eb17aeac
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
3 changed files with 12 additions and 12 deletions

View File

@ -1 +1 @@
36b0bc23d8d2e78739afc2e2f6b7d44a822994d365f98bc802728e655d87d503 /usr/local/bin/tox-bootstrapd
739b0d6d431aa5cfd73e81002f09733ec44740c8de8f38eed651dc26c8c9a102 /usr/local/bin/tox-bootstrapd

View File

@ -193,7 +193,7 @@ int read_TCP_packet(const Logger *logger, Socket sock, uint8_t *data, uint16_t l
const uint16_t count = net_socket_data_recv_buffer(sock);
if (count < length) {
LOGGER_INFO(logger, "recv buffer has %d bytes, but requested %d bytes", count, length);
LOGGER_TRACE(logger, "recv buffer has %d bytes, but requested %d bytes", count, length);
return -1;
}

View File

@ -355,7 +355,7 @@ static int read_connection_handshake(const Logger *logger, TCP_Secure_Connection
const int len = read_TCP_packet(logger, con->con.sock, data, TCP_CLIENT_HANDSHAKE_SIZE, &con->con.ip_port);
if (len == -1) {
LOGGER_WARNING(logger, "connection handshake is not ready yet");
LOGGER_TRACE(logger, "connection handshake is not ready yet");
return 0;
}
@ -904,12 +904,12 @@ static int do_incoming(TCP_Server *tcp_server, uint32_t i)
return -1;
}
LOGGER_DEBUG(tcp_server->logger, "handling incoming TCP connection %d", i);
LOGGER_TRACE(tcp_server->logger, "handling incoming TCP connection %d", i);
const int ret = read_connection_handshake(tcp_server->logger, conn, tcp_server->secret_key);
if (ret == -1) {
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d dropped due to failed handshake", i);
LOGGER_TRACE(tcp_server->logger, "incoming connection %d dropped due to failed handshake", i);
kill_TCP_secure_connection(conn);
return -1;
}
@ -941,7 +941,7 @@ static int do_unconfirmed(TCP_Server *tcp_server, const Mono_Time *mono_time, ui
return -1;
}
LOGGER_DEBUG(tcp_server->logger, "handling unconfirmed TCP connection %d", i);
LOGGER_TRACE(tcp_server->logger, "handling unconfirmed TCP connection %d", i);
uint8_t packet[MAX_PACKET_SIZE];
const int len = read_packet_TCP_secure_connection(tcp_server->logger, conn->con.sock, &conn->next_packet_length,
@ -978,7 +978,7 @@ static bool tcp_process_secure_packet(TCP_Server *tcp_server, uint32_t i)
}
if (handle_TCP_packet(tcp_server, i, packet, len) == -1) {
LOGGER_DEBUG(tcp_server->logger, "dropping connection %d: data packet (len=%d) not handled", i, len);
LOGGER_TRACE(tcp_server->logger, "dropping connection %d: data packet (len=%d) not handled", i, len);
kill_accepted(tcp_server, i);
return false;
}
@ -1088,19 +1088,19 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
}
case TCP_SOCKET_INCOMING: {
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d dropped", index);
LOGGER_TRACE(tcp_server->logger, "incoming connection %d dropped", index);
kill_TCP_secure_connection(&tcp_server->incoming_connection_queue[index]);
break;
}
case TCP_SOCKET_UNCONFIRMED: {
LOGGER_DEBUG(tcp_server->logger, "unconfirmed connection %d dropped", index);
LOGGER_TRACE(tcp_server->logger, "unconfirmed connection %d dropped", index);
kill_TCP_secure_connection(&tcp_server->unconfirmed_connection_queue[index]);
break;
}
case TCP_SOCKET_CONFIRMED: {
LOGGER_DEBUG(tcp_server->logger, "confirmed connection %d dropped", index);
LOGGER_TRACE(tcp_server->logger, "confirmed connection %d dropped", index);
kill_accepted(tcp_server, index);
break;
}
@ -1150,7 +1150,7 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
const int index_new = do_incoming(tcp_server, index);
if (index_new != -1) {
LOGGER_DEBUG(tcp_server->logger, "incoming connection %d was accepted as %d", index, index_new);
LOGGER_TRACE(tcp_server->logger, "incoming connection %d was accepted as %d", index, index_new);
events[n].events = EPOLLIN | EPOLLET | EPOLLRDHUP;
events[n].data.u64 = sock.socket | ((uint64_t)TCP_SOCKET_UNCONFIRMED << 32) | ((uint64_t)index_new << 40);
@ -1168,7 +1168,7 @@ static bool tcp_epoll_process(TCP_Server *tcp_server, const Mono_Time *mono_time
const int index_new = do_unconfirmed(tcp_server, mono_time, index);
if (index_new != -1) {
LOGGER_DEBUG(tcp_server->logger, "unconfirmed connection %d was confirmed as %d", index, index_new);
LOGGER_TRACE(tcp_server->logger, "unconfirmed connection %d was confirmed as %d", index, index_new);
events[n].events = EPOLLIN | EPOLLET | EPOLLRDHUP;
events[n].data.u64 = sock.socket | ((uint64_t)TCP_SOCKET_CONFIRMED << 32) | ((uint64_t)index_new << 40);