From: Piotrek Zadroga Date: Thu, 25 Apr 2024 19:23:13 +0000 (+0200) Subject: [#2820] revert some log msgs X-Git-Tag: Kea-2.5.8~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45eccb302e76cd386c6099b06d3c1d7541e7fb2f;p=thirdparty%2Fkea.git [#2820] revert some log msgs --- diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc index 3a556e9e51..f52a10e1f5 100644 --- a/src/bin/dhcp4/dhcp4_messages.cc +++ b/src/bin/dhcp4/dhcp4_messages.cc @@ -195,10 +195,10 @@ namespace { const char* values[] = { "DHCP4_ACTIVATE_INTERFACE", "activating interface %1", "DHCP4_ALREADY_RUNNING", "%1 already running? %2", - "DHCP4_BUFFER_RECEIVED", "%1: received buffer from %2:%3 to %4:%5 over interface %6", - "DHCP4_BUFFER_RECEIVE_FAIL", "%1: error on attempt to receive packet: %2", - "DHCP4_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4", - "DHCP4_BUFFER_WAIT_SIGNAL", "%1: signal received while waiting for next packet", + "DHCP4_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5", + "DHCP4_BUFFER_RECEIVE_FAIL", "error on attempt to receive packet: %1", + "DHCP4_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3", + "DHCP4_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet", "DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success", @@ -246,10 +246,10 @@ const char* values[] = { "DHCP4_DHCP4O6_BAD_PACKET", "%1: received malformed DHCPv4o6 packet: %2", "DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_DROP", "%1: packet was dropped, because a callout set the next step to 'drop'", "DHCP4_DHCP4O6_HOOK_SUBNET4_SELECT_SKIP", "%1: no subnet was selected, because a callout set the next skip flag", - "DHCP4_DHCP4O6_PACKET_RECEIVED", "%1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 on interface %4", + "DHCP4_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3", "DHCP4_DHCP4O6_PACKET_SEND", "%1: trying to send packet %2 (type %3) to %4 port %5 on interface %6 encapsulating %7: %8 (type %9)", "DHCP4_DHCP4O6_PACKET_SEND_FAIL", "%1: failed to send DHCPv4o6 packet: %2", - "DHCP4_DHCP4O6_RECEIVE_FAIL", "%1: failed to receive DHCPv4o6: %2", + "DHCP4_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1", "DHCP4_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv6 server", "DHCP4_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4", "DHCP4_DHCP4O6_SUBNET_DATA", "%1: the selected subnet details: %2", diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes index 1c50bb8fcc..3192b2517b 100644 --- a/src/bin/dhcp4/dhcp4_messages.mes +++ b/src/bin/dhcp4/dhcp4_messages.mes @@ -22,24 +22,24 @@ the server. In such an event, it would be necessary to manually remove the PID file. The first argument is the DHCPv4 process name, the second contains the PID and PID file. -% DHCP4_BUFFER_RECEIVED %1: received buffer from %2:%3 to %4:%5 over interface %6 +% DHCP4_BUFFER_RECEIVED received buffer from %1:%2 to %3:%4 over interface %5 This debug message is logged when the server has received a packet over the socket. When the message is logged the contents of the received packet hasn't been parsed yet. The only available information is the interface and the source and destination IPv4 addresses/ports. -% DHCP4_BUFFER_RECEIVE_FAIL %1: error on attempt to receive packet: %2 +% DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: %1 The DHCPv4 server tried to receive a packet but an error occurred during this attempt. The reason for the error is included in the message. -% DHCP4_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4 +% DHCP4_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3 This debug message is issued when the server starts parsing the received buffer holding the DHCPv4 message. The arguments specify the source and destination IPv4 addresses as well as the interface over which the buffer has been received. -% DHCP4_BUFFER_WAIT_SIGNAL %1: signal received while waiting for next packet +% DHCP4_BUFFER_WAIT_SIGNAL signal received while waiting for next packet This debug message is issued when the server was waiting for the packet, but the wait has been interrupted by the signal received by the process. The signal will be handled before the server starts @@ -318,7 +318,7 @@ will be only able to offer global options - no addresses will be assigned. The argument specifies the client and transaction identification information. -% DHCP4_DHCP4O6_PACKET_RECEIVED %1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 on interface %4 +% DHCP4_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 on interface %3 This debug message is printed when the server is receiving a DHCPv4o6 from the DHCPv4 server over inter-process communication. @@ -333,7 +333,7 @@ This error is output if the IPv4 DHCP server fails to send an DHCPv4o6 message to the IPv6 DHCP server. The reason for the error is included in the message. -% DHCP4_DHCP4O6_RECEIVE_FAIL %1: failed to receive DHCPv4o6: %2 +% DHCP4_DHCP4O6_RECEIVE_FAIL failed to receive DHCPv4o6: %1 This debug message indicates the inter-process communication with the DHCPv6 server failed. The reason for the error is included in the message. diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 266a37b12a..9bcfe9f0a2 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -1161,7 +1161,6 @@ void Dhcpv4Srv::runOne() { // client's message and server's response Pkt4Ptr query; - string label = "[no hwaddr info], cid=[no info], tid=[no info]"; try { // Set select() timeout to 1s. This value should not be modified @@ -1177,9 +1176,7 @@ Dhcpv4Srv::runOne() { // point are: the interface, source address and destination addresses // and ports. if (query) { - label = query->getLabel(); LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_BUFFER_RECEIVED) - .arg(label) .arg(query->getRemoteAddr().toText()) .arg(query->getRemotePort()) .arg(query->getLocalAddr().toText()) @@ -1199,12 +1196,10 @@ Dhcpv4Srv::runOne() { // SIGINT, SIGHUP or SIGCHLD which are handled by the server. For // signals that are not handled by the server we rely on the default // behavior of the system. - LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_SIGNAL) - .arg(label); + LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_WAIT_SIGNAL); } catch (const std::exception& e) { // Log all other errors. LOG_ERROR(packet4_logger, DHCP4_BUFFER_RECEIVE_FAIL) - .arg(label) .arg(e.what()); } @@ -1331,7 +1326,6 @@ Dhcpv4Srv::processPacket(Pkt4Ptr query, bool allow_answer_park) { if (!skip_unpack) { try { LOG_DEBUG(options4_logger, DBG_DHCP4_DETAIL, DHCP4_BUFFER_UNPACK) - .arg(query->getLabel()) .arg(query->getRemoteAddr().toText()) .arg(query->getLocalAddr().toText()) .arg(query->getIface()); diff --git a/src/bin/dhcp4/dhcp4to6_ipc.cc b/src/bin/dhcp4/dhcp4to6_ipc.cc index 889fe5ba50..65eb86e05a 100644 --- a/src/bin/dhcp4/dhcp4to6_ipc.cc +++ b/src/bin/dhcp4/dhcp4to6_ipc.cc @@ -55,7 +55,6 @@ void Dhcp4to6Ipc::open() { void Dhcp4to6Ipc::handler(int /* fd */) { Dhcp4to6Ipc& ipc = Dhcp4to6Ipc::instance(); Pkt6Ptr pkt; - string label = "[no hwaddr info], cid=[no info], tid=[no info]"; try { LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_RECEIVING); @@ -64,9 +63,7 @@ void Dhcp4to6Ipc::handler(int /* fd */) { // From Dhcpv4Srv::runOne() after receivePacket() if (pkt) { - label = pkt->getLabel(); LOG_DEBUG(packet4_logger, DBG_DHCP4_BASIC, DHCP4_DHCP4O6_PACKET_RECEIVED) - .arg(label) .arg(static_cast(pkt->getType())) .arg(pkt->getRemoteAddr().toText()) .arg(pkt->getRemotePort()) @@ -74,7 +71,6 @@ void Dhcp4to6Ipc::handler(int /* fd */) { } } catch (const std::exception& e) { LOG_DEBUG(packet4_logger, DBG_DHCP4_DETAIL, DHCP4_DHCP4O6_RECEIVE_FAIL) - .arg(label) .arg(e.what()); } diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc index ddf14c7f44..8a04f31fc6 100644 --- a/src/bin/dhcp6/dhcp6_messages.cc +++ b/src/bin/dhcp6/dhcp6_messages.cc @@ -188,9 +188,9 @@ const char* values[] = { "DHCP6_ADD_GLOBAL_STATUS_CODE", "%1: adding Status Code to DHCPv6 packet: %2", "DHCP6_ADD_STATUS_CODE_FOR_IA", "%1: adding Status Code to IA with iaid=%2: %3", "DHCP6_ALREADY_RUNNING", "%1 already running? %2", - "DHCP6_BUFFER_RECEIVED", "%1: received buffer from %2:%3 to %4:%5 over interface %6", - "DHCP6_BUFFER_UNPACK", "%1: parsing buffer received from %2 to %3 over interface %4", - "DHCP6_BUFFER_WAIT_SIGNAL", "%1: signal received while waiting for next packet", + "DHCP6_BUFFER_RECEIVED", "received buffer from %1:%2 to %3:%4 over interface %5", + "DHCP6_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3", + "DHCP6_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet", "DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1", "DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success", @@ -235,8 +235,8 @@ const char* values[] = { "DHCP6_DECLINE_PROCESS_IA", "Processing of IA (IAID: %1) from client %2 started.", "DHCP6_DEPRECATED", "The following mechanism is now deprecated and will be removed in the future: %1", "DHCP6_DEVELOPMENT_VERSION", "This software is a development branch of Kea. It is not recommended for production use.", - "DHCP6_DHCP4O6_PACKET_RECEIVED", "%1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 port %4 on interface %5", - "DHCP6_DHCP4O6_RECEIVE_FAIL", "%1: failed to receive DHCPv4o6: %2", + "DHCP6_DHCP4O6_PACKET_RECEIVED", "received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4", + "DHCP6_DHCP4O6_RECEIVE_FAIL", "failed to receive DHCPv4o6: %1", "DHCP6_DHCP4O6_RECEIVING", "receiving DHCPv4o6 packet from DHCPv4 server", "DHCP6_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4", "DHCP6_DHCP4O6_SEND_FAIL", "%1: failed to send DHCPv4o6 packet: %2", @@ -295,7 +295,7 @@ const char* values[] = { "DHCP6_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2", "DHCP6_PACKET_QUEUE_FULL", "multi-threading packet queue is full", "DHCP6_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6", - "DHCP6_PACKET_RECEIVE_FAIL", "%1: error on attempt to receive packet: %2", + "DHCP6_PACKET_RECEIVE_FAIL", "error on attempt to receive packet: %1", "DHCP6_PACKET_SEND", "%1: trying to send packet %2 (type %3) from [%4]:%5 to [%6]:%7 on interface %8", "DHCP6_PACKET_SEND_FAIL", "%1: failed to send DHCPv6 packet: %2", "DHCP6_PACK_FAIL", "1%: failed to assemble response correctly: %2", diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes index 99ec3a5fd7..be56caded8 100644 --- a/src/bin/dhcp6/dhcp6_messages.mes +++ b/src/bin/dhcp6/dhcp6_messages.mes @@ -42,19 +42,19 @@ the server. In such an event, it would be necessary to manually remove the PID file. The first argument is the DHCPv6 process name, the second contains the PID and PID file. -% DHCP6_BUFFER_RECEIVED %1: received buffer from %2:%3 to %4:%5 over interface %6 +% DHCP6_BUFFER_RECEIVED received buffer from %1:%2 to %3:%4 over interface %5 This debug message is logged when the server has received a packet over the socket. When the message is logged the contents of the received packet hasn't been parsed yet. The only available information is the interface and the source and destination addresses/ports. -% DHCP6_BUFFER_UNPACK %1: parsing buffer received from %2 to %3 over interface %4 +% DHCP6_BUFFER_UNPACK parsing buffer received from %1 to %2 over interface %3 This debug message is issued when the server starts parsing the received buffer holding the DHCPv6 message. The arguments specify the source and destination addresses as well as the interface over which the buffer has been received. -% DHCP6_BUFFER_WAIT_SIGNAL %1: signal received while waiting for next packet +% DHCP6_BUFFER_WAIT_SIGNAL signal received while waiting for next packet This debug message is issued when the server was waiting for the packet, but the wait has been interrupted by the signal received by the process. The signal will be handled before the server starts @@ -321,11 +321,11 @@ should plan your strategy to stop using it soon. This warning message is displayed when the version is a development (vs stable) one: the second number of the version is odd. -% DHCP6_DHCP4O6_PACKET_RECEIVED %1: received DHCPv4o6 packet from DHCPv4 server (type %2) for %3 port %4 on interface %5 +% DHCP6_DHCP4O6_PACKET_RECEIVED received DHCPv4o6 packet from DHCPv4 server (type %1) for %2 port %3 on interface %4 This debug message is printed when the server is receiving a DHCPv4o6 from the DHCPv4 server over inter-process communication. -% DHCP6_DHCP4O6_RECEIVE_FAIL %1: failed to receive DHCPv4o6: %2 +% DHCP6_DHCP4O6_RECEIVE_FAIL failed to receive DHCPv4o6: %1 This debug message indicates the inter-process communication with the DHCPv4 server failed. The reason for the error is included in the message. @@ -682,7 +682,7 @@ respectively. The remaining arguments specify the source address, destination IP address and the name of the interface on which the message has been received. -% DHCP6_PACKET_RECEIVE_FAIL %1: error on attempt to receive packet: %2 +% DHCP6_PACKET_RECEIVE_FAIL error on attempt to receive packet: %1 The IPv6 DHCP server tried to receive a packet but an error occurred during this attempt. The reason for the error is included in the message. diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index eff146b8f6..40c99114f0 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -642,7 +642,6 @@ void Dhcpv6Srv::runOne() { // client's message and server's response Pkt6Ptr query; - string label = "duid=[no info], [no hwaddr info], tid=[no info]"; try { // Set select() timeout to 1s. This value should not be modified @@ -658,9 +657,7 @@ Dhcpv6Srv::runOne() { // point are: the interface, source address and destination addresses // and ports. if (query) { - label = query->getLabel(); LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_BUFFER_RECEIVED) - .arg(label) .arg(query->getRemoteAddr().toText()) .arg(query->getRemotePort()) .arg(query->getLocalAddr().toText()) @@ -686,10 +683,9 @@ Dhcpv6Srv::runOne() { // SIGINT, SIGHUP or SIGCHLD which are handled by the server. For // signals that are not handled by the server we rely on the default // behavior of the system. - LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_SIGNAL).arg(label); + LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_WAIT_SIGNAL); } catch (const std::exception& e) { LOG_ERROR(packet6_logger, DHCP6_PACKET_RECEIVE_FAIL) - .arg(label) .arg(e.what()); } @@ -815,7 +811,6 @@ Dhcpv6Srv::processPacket(Pkt6Ptr query) { if (!skip_unpack) { try { LOG_DEBUG(options6_logger, DBG_DHCP6_DETAIL, DHCP6_BUFFER_UNPACK) - .arg(query->getLabel()) .arg(query->getRemoteAddr().toText()) .arg(query->getLocalAddr().toText()) .arg(query->getIface()); diff --git a/src/bin/dhcp6/dhcp6to4_ipc.cc b/src/bin/dhcp6/dhcp6to4_ipc.cc index 84e2a4eb78..192a14faf7 100644 --- a/src/bin/dhcp6/dhcp6to4_ipc.cc +++ b/src/bin/dhcp6/dhcp6to4_ipc.cc @@ -57,7 +57,6 @@ void Dhcp6to4Ipc::open() { void Dhcp6to4Ipc::handler(int /* fd */) { Dhcp6to4Ipc& ipc = Dhcp6to4Ipc::instance(); Pkt6Ptr pkt; - string label = "duid=[no info], [no hwaddr info], tid=[no info]"; try { LOG_DEBUG(packet6_logger, DBG_DHCP6_DETAIL, DHCP6_DHCP4O6_RECEIVING); @@ -65,9 +64,7 @@ void Dhcp6to4Ipc::handler(int /* fd */) { pkt = ipc.receive(); if (pkt) { - label = pkt->getLabel(); LOG_DEBUG(packet6_logger, DBG_DHCP6_BASIC, DHCP6_DHCP4O6_PACKET_RECEIVED) - .arg(label) .arg(static_cast(pkt->getType())) .arg(pkt->getRemoteAddr().toText()) .arg(pkt->getRemotePort()) @@ -75,7 +72,6 @@ void Dhcp6to4Ipc::handler(int /* fd */) { } } catch (const std::exception& e) { LOG_DEBUG(packet6_logger,DBG_DHCP6_DETAIL, DHCP6_DHCP4O6_RECEIVE_FAIL) - .arg(label) .arg(e.what()); }