summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotrek Zadroga <piotrek@isc.org>2024-04-26 12:26:05 +0200
committerPiotrek Zadroga <piotrek@isc.org>2024-04-26 14:43:12 +0200
commit9b4a2d26d5465737729e77e5ef86cf39e923764a (patch)
tree70ba486e81a8f6cf915ae70db08ed63d948e250a
parent[#2820] revert some log msgs (diff)
downloadkea-9b4a2d26d5465737729e77e5ef86cf39e923764a.tar.xz
kea-9b4a2d26d5465737729e77e5ef86cf39e923764a.zip
[#2820] addressed review comments
-rw-r--r--src/bin/dhcp4/dhcp4_messages.cc4
-rw-r--r--src/bin/dhcp4/dhcp4_messages.h2
-rw-r--r--src/bin/dhcp4/dhcp4_messages.mes14
-rw-r--r--src/bin/dhcp4/dhcp4_srv.cc6
-rw-r--r--src/bin/dhcp6/dhcp6_messages.cc4
-rw-r--r--src/bin/dhcp6/dhcp6_messages.h2
-rw-r--r--src/bin/dhcp6/dhcp6_messages.mes14
-rw-r--r--src/bin/dhcp6/dhcp6_srv.cc6
8 files changed, 44 insertions, 8 deletions
diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc
index f52a10e1f5..3ee62864d8 100644
--- a/src/bin/dhcp4/dhcp4_messages.cc
+++ b/src/bin/dhcp4/dhcp4_messages.cc
@@ -138,7 +138,9 @@ extern const isc::log::MessageID DHCP4_PACKET_OPTION_UNPACK_FAIL = "DHCP4_PACKET
extern const isc::log::MessageID DHCP4_PACKET_PACK = "DHCP4_PACKET_PACK";
extern const isc::log::MessageID DHCP4_PACKET_PACK_FAIL = "DHCP4_PACKET_PACK_FAIL";
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION = "DHCP4_PACKET_PROCESS_EXCEPTION";
+extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION_MAIN = "DHCP4_PACKET_PROCESS_EXCEPTION_MAIN";
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION = "DHCP4_PACKET_PROCESS_STD_EXCEPTION";
+extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN = "DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN";
extern const isc::log::MessageID DHCP4_PACKET_QUEUE_FULL = "DHCP4_PACKET_QUEUE_FULL";
extern const isc::log::MessageID DHCP4_PACKET_RECEIVED = "DHCP4_PACKET_RECEIVED";
extern const isc::log::MessageID DHCP4_PACKET_SEND = "DHCP4_PACKET_SEND";
@@ -324,7 +326,9 @@ const char* values[] = {
"DHCP4_PACKET_PACK", "%1: preparing on-wire format of the packet to be sent",
"DHCP4_PACKET_PACK_FAIL", "%1: preparing on-wire-format of the packet to be sent failed %2",
"DHCP4_PACKET_PROCESS_EXCEPTION", "%1: exception occurred during packet processing",
+ "DHCP4_PACKET_PROCESS_EXCEPTION_MAIN", "exception occurred during packet processing",
"DHCP4_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2",
+ "DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN", "exception occurred during packet processing: %1",
"DHCP4_PACKET_QUEUE_FULL", "multi-threading packet queue is full",
"DHCP4_PACKET_RECEIVED", "%1: %2 (type %3) received from %4 to %5 on interface %6",
"DHCP4_PACKET_SEND", "%1: trying to send packet %2 (type %3) from %4:%5 to %6:%7 on interface %8",
diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h
index 3b4f25c51a..7f9ef8acff 100644
--- a/src/bin/dhcp4/dhcp4_messages.h
+++ b/src/bin/dhcp4/dhcp4_messages.h
@@ -139,7 +139,9 @@ extern const isc::log::MessageID DHCP4_PACKET_OPTION_UNPACK_FAIL;
extern const isc::log::MessageID DHCP4_PACKET_PACK;
extern const isc::log::MessageID DHCP4_PACKET_PACK_FAIL;
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION;
+extern const isc::log::MessageID DHCP4_PACKET_PROCESS_EXCEPTION_MAIN;
extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION;
+extern const isc::log::MessageID DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN;
extern const isc::log::MessageID DHCP4_PACKET_QUEUE_FULL;
extern const isc::log::MessageID DHCP4_PACKET_RECEIVED;
extern const isc::log::MessageID DHCP4_PACKET_SEND;
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index 3192b2517b..ea0d12922b 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -789,12 +789,26 @@ during packet processing that was not caught by other, more specific
exception handlers. This packet will be dropped and the server will
continue operation.
+% DHCP4_PACKET_PROCESS_EXCEPTION_MAIN exception occurred during packet processing
+This error message indicates that a non-standard exception was raised
+during packet processing that was not caught by other, more specific
+exception handlers. This packet will be dropped and the server will
+continue operation. This error message may appear in main server processing
+loop.
+
% DHCP4_PACKET_PROCESS_STD_EXCEPTION %1: exception occurred during packet processing: %2
This error message indicates that a standard exception was raised
during packet processing that was not caught by other, more specific
exception handlers. This packet will be dropped and the server will
continue operation.
+% DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN exception occurred during packet processing: %1
+This error message indicates that a standard exception was raised
+during packet processing that was not caught by other, more specific
+exception handlers. This packet will be dropped and the server will
+continue operation. This error message may appear in main server processing
+loop.
+
% DHCP4_PACKET_QUEUE_FULL multi-threading packet queue is full
A debug message noting that the multi-threading packet queue is full so
the oldest packet of the queue was dropped to make room for the received one.
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index 9bcfe9f0a2..2136dcb281 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -1136,15 +1136,13 @@ Dhcpv4Srv::run() {
} catch (const std::exception& e) {
// General catch-all exception that are not caught by more specific
// catches. This one is for exceptions derived from std::exception.
- LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_STD_EXCEPTION)
- .arg("[no hwaddr info], cid=[no info], tid=[no info]")
+ LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_STD_EXCEPTION_MAIN)
.arg(e.what());
} catch (...) {
// General catch-all exception that are not caught by more specific
// catches. This one is for other exceptions, not derived from
// std::exception.
- LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION)
- .arg("[no hwaddr info], cid=[no info], tid=[no info]");
+ LOG_ERROR(packet4_logger, DHCP4_PACKET_PROCESS_EXCEPTION_MAIN);
}
}
diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc
index 8a04f31fc6..3c01ddb48a 100644
--- a/src/bin/dhcp6/dhcp6_messages.cc
+++ b/src/bin/dhcp6/dhcp6_messages.cc
@@ -115,8 +115,10 @@ extern const isc::log::MessageID DHCP6_PACKET_DROP_SERVERID_MISMATCH = "DHCP6_PA
extern const isc::log::MessageID DHCP6_PACKET_DROP_UNICAST = "DHCP6_PACKET_DROP_UNICAST";
extern const isc::log::MessageID DHCP6_PACKET_OPTIONS_SKIPPED = "DHCP6_PACKET_OPTIONS_SKIPPED";
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION = "DHCP6_PACKET_PROCESS_EXCEPTION";
+extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION_MAIN = "DHCP6_PACKET_PROCESS_EXCEPTION_MAIN";
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL = "DHCP6_PACKET_PROCESS_FAIL";
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION = "DHCP6_PACKET_PROCESS_STD_EXCEPTION";
+extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN = "DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN";
extern const isc::log::MessageID DHCP6_PACKET_QUEUE_FULL = "DHCP6_PACKET_QUEUE_FULL";
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED = "DHCP6_PACKET_RECEIVED";
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL = "DHCP6_PACKET_RECEIVE_FAIL";
@@ -291,8 +293,10 @@ const char* values[] = {
"DHCP6_PACKET_DROP_UNICAST", "%1: dropping unicast %2 packet as this packet should be sent to multicast",
"DHCP6_PACKET_OPTIONS_SKIPPED", "%1: An error unpacking an option, caused subsequent options to be skipped: %2",
"DHCP6_PACKET_PROCESS_EXCEPTION", "%1: exception occurred during packet processing",
+ "DHCP6_PACKET_PROCESS_EXCEPTION_MAIN", "exception occurred during packet processing",
"DHCP6_PACKET_PROCESS_FAIL", "%1: processing of %2 message received from %3 failed: %4",
"DHCP6_PACKET_PROCESS_STD_EXCEPTION", "%1: exception occurred during packet processing: %2",
+ "DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN", "exception occurred during packet processing: %1",
"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", "error on attempt to receive packet: %1",
diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h
index 91555d2d11..dfcaa1925b 100644
--- a/src/bin/dhcp6/dhcp6_messages.h
+++ b/src/bin/dhcp6/dhcp6_messages.h
@@ -116,8 +116,10 @@ extern const isc::log::MessageID DHCP6_PACKET_DROP_SERVERID_MISMATCH;
extern const isc::log::MessageID DHCP6_PACKET_DROP_UNICAST;
extern const isc::log::MessageID DHCP6_PACKET_OPTIONS_SKIPPED;
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION;
+extern const isc::log::MessageID DHCP6_PACKET_PROCESS_EXCEPTION_MAIN;
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_FAIL;
extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION;
+extern const isc::log::MessageID DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN;
extern const isc::log::MessageID DHCP6_PACKET_QUEUE_FULL;
extern const isc::log::MessageID DHCP6_PACKET_RECEIVED;
extern const isc::log::MessageID DHCP6_PACKET_RECEIVE_FAIL;
diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes
index be56caded8..9e23f25eb4 100644
--- a/src/bin/dhcp6/dhcp6_messages.mes
+++ b/src/bin/dhcp6/dhcp6_messages.mes
@@ -658,6 +658,13 @@ during packet processing that was not caught by other, more specific
exception handlers. This packet will be dropped and the server will
continue operation.
+% DHCP6_PACKET_PROCESS_EXCEPTION_MAIN exception occurred during packet processing
+This error message indicates that a non-standard exception was raised
+during packet processing that was not caught by other, more specific
+exception handlers. This packet will be dropped and the server will
+continue operation. This error message may appear in main server processing
+loop.
+
% DHCP6_PACKET_PROCESS_FAIL %1: processing of %2 message received from %3 failed: %4
This is a general catch-all message indicating that the processing of the
specified packet type from the indicated address failed. The reason is given in the
@@ -669,6 +676,13 @@ during packet processing that was not caught by other, more specific
exception handlers. This packet will be dropped and the server will
continue operation.
+% DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN exception occurred during packet processing: %1
+This error message indicates that a standard exception was raised
+during packet processing that was not caught by other, more specific
+exception handlers. This packet will be dropped and the server will
+continue operation. This error message may appear in main server processing
+loop.
+
% DHCP6_PACKET_QUEUE_FULL multi-threading packet queue is full
A debug message noting that the multi-threading packet queue is full so
the oldest packet of the queue was dropped to make room for the received one.
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index 40c99114f0..0bf88e18a1 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -617,15 +617,13 @@ Dhcpv6Srv::run() {
} catch (const std::exception& e) {
// General catch-all standard exceptions that are not caught by more
// specific catches.
- LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_STD_EXCEPTION)
- .arg("duid=[no info], [no hwaddr info], tid=[no info]")
+ LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_STD_EXCEPTION_MAIN)
.arg(e.what());
} catch (...) {
// General catch-all non-standard exception that are not caught
// by more specific catches.
- LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION)
- .arg("duid=[no info], [no hwaddr info], tid=[no info]");
+ LOG_ERROR(packet6_logger, DHCP6_PACKET_PROCESS_EXCEPTION_MAIN);
}
}