]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1945] log EVAL_RESULT messages only at debug level
authorAndrei Pavel <andrei@isc.org>
Mon, 19 Aug 2024 11:33:18 +0000 (14:33 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 22 Aug 2024 12:47:23 +0000 (15:47 +0300)
- Split the 15 occurrences of EVAL_RESULT into one message for each log call in code.
- Log all these messages only on debug level 50.
- Remove bad practice `catch (...)` and the message logged on that if-branch.

16 files changed:
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc
src/lib/config/config_messages.cc
src/lib/config/config_messages.h
src/lib/dhcpsrv/client_class_def.cc
src/lib/dhcpsrv/dhcpsrv_messages.cc
src/lib/dhcpsrv/dhcpsrv_messages.h
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/eval/eval_messages.mes
tools/exhonerated-duplicate-messages.txt

index fca4919fbef8d1752a29c3a5c7bcae2c8406bceb..9d4cedc5e40a94a39e815e80ef9eb07aaebe6435 100644 (file)
@@ -148,6 +148,8 @@ extern const isc::log::MessageID DHCP4_RELEASE_FAIL = "DHCP4_RELEASE_FAIL";
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_NO_LEASE = "DHCP4_RELEASE_FAIL_NO_LEASE";
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_WRONG_CLIENT = "DHCP4_RELEASE_FAIL_WRONG_CLIENT";
 extern const isc::log::MessageID DHCP4_REQUEST = "DHCP4_REQUEST";
+extern const isc::log::MessageID DHCP4_REQUIRED_CLASS_EVAL_ERROR = "DHCP4_REQUIRED_CLASS_EVAL_ERROR";
+extern const isc::log::MessageID DHCP4_REQUIRED_CLASS_EVAL_RESULT = "DHCP4_REQUIRED_CLASS_EVAL_RESULT";
 extern const isc::log::MessageID DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED = "DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED";
 extern const isc::log::MessageID DHCP4_RESERVED_HOSTNAME_ASSIGNED = "DHCP4_RESERVED_HOSTNAME_ASSIGNED";
 extern const isc::log::MessageID DHCP4_RESPONSE_DATA = "DHCP4_RESPONSE_DATA";
@@ -324,6 +326,8 @@ const char* values[] = {
     "DHCP4_RELEASE_FAIL_NO_LEASE", "%1: client is trying to release non-existing lease %2",
     "DHCP4_RELEASE_FAIL_WRONG_CLIENT", "%1: client is trying to release the lease %2 which belongs to a different client",
     "DHCP4_REQUEST", "%1: server is processing DHCPREQUEST with hint=%2",
+    "DHCP4_REQUIRED_CLASS_EVAL_ERROR", "%1: Expression '%2' evaluated to %3",
+    "DHCP4_REQUIRED_CLASS_EVAL_RESULT", "%1: Expression '%2' evaluated to %3",
     "DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED", "Multi-threading is enabled and host reservations lookup is always performed first.",
     "DHCP4_RESERVED_HOSTNAME_ASSIGNED", "%1: server assigned reserved hostname %2",
     "DHCP4_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
index 22400d909de9ec325ab2bd1c1d81b2cbcf7b0b0f..2005b255f4d110cda8ab7e18c543953ea716949b 100644 (file)
@@ -149,6 +149,8 @@ extern const isc::log::MessageID DHCP4_RELEASE_FAIL;
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_NO_LEASE;
 extern const isc::log::MessageID DHCP4_RELEASE_FAIL_WRONG_CLIENT;
 extern const isc::log::MessageID DHCP4_REQUEST;
+extern const isc::log::MessageID DHCP4_REQUIRED_CLASS_EVAL_ERROR;
+extern const isc::log::MessageID DHCP4_REQUIRED_CLASS_EVAL_RESULT;
 extern const isc::log::MessageID DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED;
 extern const isc::log::MessageID DHCP4_RESERVED_HOSTNAME_ASSIGNED;
 extern const isc::log::MessageID DHCP4_RESPONSE_DATA;
index 59509b590b7b4279f1c50749c562ba2ba4b69e8c..b92314a7087bf8d7ac4cecc673da7b5155084504 100644 (file)
@@ -978,6 +978,17 @@ about the address that the client would like to have allocated.
 If there is no hint, the argument should provide the text indicating
 that the hint hasn't been sent.
 
+% DHCP4_REQUIRED_CLASS_EVAL_ERROR %1: Expression '%2' evaluated to %3
+This error message indicates that there a problem was encountered while
+evaluating an expression of a client class that was marked as required.
+A description of the problem is printed.
+
+% DHCP4_REQUIRED_CLASS_EVAL_RESULT %1: Expression '%2' evaluated to %3
+Logged at debug log level 50.
+This debug message indicates that the expression of a client class has been
+successfully evaluated. The client class name and the result value of the
+evaluation are printed.
+
 % DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
 This is a message informing that host reservations lookup is performed before
 lease lookup when multi-threading is enabled overwriting configured value.
index 43a60bb8a0369a7e60f10bdab264dcd8cb296b05..f6e734fa3492d3860f64684b4e57593a6c0c5643 100644 (file)
@@ -4884,29 +4884,19 @@ void Dhcpv4Srv::requiredClassify(Dhcpv4Exchange& ex) {
         // true (match) or raise an exception (error)
         try {
             bool status = evaluateBool(*expr_ptr, *query);
+            LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL, DHCP4_REQUIRED_CLASS_EVAL_RESULT)
+                .arg(query->getLabel())
+                .arg(cclass)
+                .arg(status ? "true" : "false");
             if (status) {
-                LOG_INFO(dhcp4_logger, EVAL_RESULT)
-                    .arg(query->getLabel())
-                    .arg(cclass)
-                    .arg("true");
                 // Matching: add the class
                 query->addClass(cclass);
-            } else {
-                LOG_DEBUG(dhcp4_logger, DBG_DHCP4_DETAIL, EVAL_RESULT)
-                    .arg(query->getLabel())
-                    .arg(cclass)
-                    .arg("false");
             }
         } catch (const Exception& ex) {
-            LOG_ERROR(dhcp4_logger, EVAL_RESULT)
+            LOG_ERROR(dhcp4_logger, DHCP4_REQUIRED_CLASS_EVAL_ERROR)
                 .arg(query->getLabel())
                 .arg(cclass)
                 .arg(ex.what());
-        } catch (...) {
-            LOG_ERROR(dhcp4_logger, EVAL_RESULT)
-                .arg(query->getLabel())
-                .arg(cclass)
-                .arg("get exception?");
         }
     }
 }
index 9b68bf1fe49bc1eca36fea932b2d58ca965ddee6..3b436d8876674b82ee09b2c41e40bc19e93644bd 100644 (file)
@@ -147,6 +147,8 @@ extern const isc::log::MessageID DHCP6_RELEASE_PD_EXPIRED = "DHCP6_RELEASE_PD_EX
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL = "DHCP6_RELEASE_PD_FAIL";
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL_WRONG_DUID = "DHCP6_RELEASE_PD_FAIL_WRONG_DUID";
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL_WRONG_IAID = "DHCP6_RELEASE_PD_FAIL_WRONG_IAID";
+extern const isc::log::MessageID DHCP6_REQUIRED_CLASS_EVAL_ERROR = "DHCP6_REQUIRED_CLASS_EVAL_ERROR";
+extern const isc::log::MessageID DHCP6_REQUIRED_CLASS_EVAL_RESULT = "DHCP6_REQUIRED_CLASS_EVAL_RESULT";
 extern const isc::log::MessageID DHCP6_REQUIRED_OPTIONS_CHECK_FAIL = "DHCP6_REQUIRED_OPTIONS_CHECK_FAIL";
 extern const isc::log::MessageID DHCP6_RESERVATIONS_LOOKUP_FIRST_ENABLED = "DHCP6_RESERVATIONS_LOOKUP_FIRST_ENABLED";
 extern const isc::log::MessageID DHCP6_RESPONSE_DATA = "DHCP6_RESPONSE_DATA";
@@ -312,6 +314,8 @@ const char* values[] = {
     "DHCP6_RELEASE_PD_FAIL", "%1: failed to release prefix %2/%3 for iaid=%4",
     "DHCP6_RELEASE_PD_FAIL_WRONG_DUID", "%1: client tried to release prefix %2/%3, but it belongs to another client (duid=%4)",
     "DHCP6_RELEASE_PD_FAIL_WRONG_IAID", "%1: client tried to release prefix %2/%3, but it used wrong IAID (expected %4, but got %5)",
+    "DHCP6_REQUIRED_CLASS_EVAL_ERROR", "%1: Expression '%2' evaluated to %3",
+    "DHCP6_REQUIRED_CLASS_EVAL_RESULT", "%1: Expression '%2' evaluated to %3",
     "DHCP6_REQUIRED_OPTIONS_CHECK_FAIL", "%1: %2 message received from %3 failed the following check: %4",
     "DHCP6_RESERVATIONS_LOOKUP_FIRST_ENABLED", "Multi-threading is enabled and host reservations lookup is always performed first.",
     "DHCP6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
index 76fa8dd26e56463946865ee134d6c6ed378235e5..dcd9a5af4789238da9647b481c5ce1e7473ad92e 100644 (file)
@@ -148,6 +148,8 @@ extern const isc::log::MessageID DHCP6_RELEASE_PD_EXPIRED;
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL;
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL_WRONG_DUID;
 extern const isc::log::MessageID DHCP6_RELEASE_PD_FAIL_WRONG_IAID;
+extern const isc::log::MessageID DHCP6_REQUIRED_CLASS_EVAL_ERROR;
+extern const isc::log::MessageID DHCP6_REQUIRED_CLASS_EVAL_RESULT;
 extern const isc::log::MessageID DHCP6_REQUIRED_OPTIONS_CHECK_FAIL;
 extern const isc::log::MessageID DHCP6_RESERVATIONS_LOOKUP_FIRST_ENABLED;
 extern const isc::log::MessageID DHCP6_RESPONSE_DATA;
index 9e8e005992f72b9ef66b03aa44ffe046adcfe7d5..678270e1306cc72f2ca212c72f60394c176114cb 100644 (file)
@@ -983,6 +983,17 @@ client and transaction identification information. The second and third
 argument identify the prefix. The fourth and fifth argument hold the
 expected IAID and IAID found respectively.
 
+% DHCP6_REQUIRED_CLASS_EVAL_ERROR %1: Expression '%2' evaluated to %3
+This error message indicates that there a problem was encountered while
+evaluating an expression of a client class that was marked as required.
+A description of the problem is printed.
+
+% DHCP6_REQUIRED_CLASS_EVAL_RESULT %1: Expression '%2' evaluated to %3
+Logged at debug log level 50.
+This debug message indicates that the expression of a client class has been
+successfully evaluated. The client class name and the result value of the
+evaluation are printed.
+
 % DHCP6_REQUIRED_OPTIONS_CHECK_FAIL %1: %2 message received from %3 failed the following check: %4
 Logged at debug log level 40.
 This message indicates that received DHCPv6 packet is invalid.  This may be due
index 72ec04ee824fc82f412fd173a2401bb49c06c001..fcf11f9b7995bc7ef85ef57ffcd5846b0466616e 100644 (file)
@@ -4503,29 +4503,19 @@ Dhcpv6Srv::requiredClassify(const Pkt6Ptr& pkt, AllocEngine::ClientContext6& ctx
         // true (match) or raise an exception (error)
         try {
             bool status = evaluateBool(*expr_ptr, *pkt);
+            LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_REQUIRED_CLASS_EVAL_RESULT)
+                .arg(pkt->getLabel())
+                .arg(cclass)
+                .arg(status ? "true" : "false");
             if (status) {
-                LOG_INFO(dhcp6_logger, EVAL_RESULT)
-                    .arg(pkt->getLabel())
-                    .arg(cclass)
-                    .arg("true");
                 // Matching: add the class
                 pkt->addClass(cclass);
-            } else {
-                LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, EVAL_RESULT)
-                    .arg(pkt->getLabel())
-                    .arg(cclass)
-                    .arg("false");
             }
         } catch (const Exception& ex) {
-            LOG_ERROR(dhcp6_logger, EVAL_RESULT)
+            LOG_ERROR(dhcp6_logger, DHCP6_REQUIRED_CLASS_EVAL_ERROR)
                 .arg(pkt->getLabel())
                 .arg(cclass)
                 .arg(ex.what());
-        } catch (...) {
-            LOG_ERROR(dhcp6_logger, EVAL_RESULT)
-                .arg(pkt->getLabel())
-                .arg(cclass)
-                .arg("get exception?");
         }
     }
 }
index f5e7a849266646ac05b27bafe6b83b104a74af09..50852faaefd4dad8bd53c7cd665d5cf90ba39556 100644 (file)
@@ -1,4 +1,4 @@
-// File created from config_messages.mes
+// File created from ../../../src/lib/config/config_messages.mes
 
 #include <cstddef>
 #include <log/message_types.h>
@@ -73,7 +73,7 @@ const char* values[] = {
     "COMMAND_WATCH_SOCKET_MARK_READY_ERROR", "watch socket failed to mark ready: %1",
     "HTTP_COMMAND_MGR_IGNORED_TLS_SETUP_CHANGES", "ignore a change in TLS setup of the http control socket",
     "HTTP_COMMAND_MGR_SERVICE_STARTED", "started %1 service bound to address %2 port %3",
-    "HTTP_COMMAND_MGR_SERVICE_STOPPING", "stopping %1 service%2",
+    "HTTP_COMMAND_MGR_SERVICE_STOPPING", "stopping %1 service %2",
     NULL
 };
 
index 0349918a06ac60b8e95f3b8996cc0713f9274ed2..1a8982ea5b45f1a196d2282bff34d60bd444adc6 100644 (file)
@@ -1,4 +1,4 @@
-// File created from config_messages.mes
+// File created from ../../../src/lib/config/config_messages.mes
 
 #ifndef CONFIG_MESSAGES_H
 #define CONFIG_MESSAGES_H
index 166d66e4b36b693f1e47dace6028b10b4961c309..fd0148913aa2c62211890fc0acdd9c7f67cd81c8 100644 (file)
@@ -146,29 +146,19 @@ ClientClassDef::test(PktPtr pkt, const ExpressionPtr& expr_ptr) {
     // true (match) or raise an exception (error)
     try {
         bool status = evaluateBool(*expr_ptr, *pkt);
+        LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_EVAL_RESULT)
+            .arg(pkt->getLabel())
+            .arg(getName())
+            .arg(status ? "true" : "false");
         if (status) {
-            LOG_INFO(dhcpsrv_logger, EVAL_RESULT)
-                .arg(pkt->getLabel())
-                .arg(getName())
-                .arg("true");
             // Matching: add the class
             pkt->addClass(getName());
-        } else {
-            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, EVAL_RESULT)
-                .arg(pkt->getLabel())
-                .arg(getName())
-                .arg("false");
         }
     } catch (const Exception& ex) {
-        LOG_ERROR(dhcpsrv_logger, EVAL_RESULT)
+        LOG_ERROR(dhcpsrv_logger, DHCPSRV_EVAL_ERROR)
             .arg(pkt->getLabel())
             .arg(getName())
             .arg(ex.what());
-    } catch (...) {
-        LOG_ERROR(dhcpsrv_logger, EVAL_RESULT)
-            .arg(pkt->getLabel())
-            .arg(getName())
-            .arg("get exception?");
     }
 }
 
@@ -187,7 +177,7 @@ TemplateClientClassDef::test(PktPtr pkt, const ExpressionPtr& expr_ptr) {
     try {
         std::string subclass = evaluateString(*expr_ptr, *pkt);
         if (!subclass.empty()) {
-            LOG_INFO(dhcpsrv_logger, EVAL_RESULT)
+            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_TEMPLATE_EVAL_RESULT)
                 .arg(pkt->getLabel())
                 .arg(getName())
                 .arg(subclass);
@@ -199,15 +189,10 @@ TemplateClientClassDef::test(PktPtr pkt, const ExpressionPtr& expr_ptr) {
             pkt->addSubClass(getName(), value);
         }
     } catch (const Exception& ex) {
-        LOG_ERROR(dhcpsrv_logger, EVAL_RESULT)
+        LOG_ERROR(dhcpsrv_logger, DHCPSRV_TEMPLATE_EVAL_ERROR)
             .arg(pkt->getLabel())
             .arg(getName())
             .arg(ex.what());
-    } catch (...) {
-        LOG_ERROR(dhcpsrv_logger, EVAL_RESULT)
-            .arg(pkt->getLabel())
-            .arg(getName())
-            .arg("get exception?");
     }
 }
 
index e213ee756fae3964fbe2fef3fa0944ce7a431563..b9b61b9a900292f7236904ca2852eec2a2d40d52 100644 (file)
@@ -56,6 +56,8 @@ extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_NCR_SENT = "DHCPSRV_DHCP_DDNS
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SENDER_STARTED = "DHCPSRV_DHCP_DDNS_SENDER_STARTED";
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SENDER_STOPPED = "DHCPSRV_DHCP_DDNS_SENDER_STOPPED";
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SUSPEND_UPDATES = "DHCPSRV_DHCP_DDNS_SUSPEND_UPDATES";
+extern const isc::log::MessageID DHCPSRV_EVAL_ERROR = "DHCPSRV_EVAL_ERROR";
+extern const isc::log::MessageID DHCPSRV_EVAL_RESULT = "DHCPSRV_EVAL_RESULT";
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_RECOVER_SKIP = "DHCPSRV_HOOK_LEASE4_RECOVER_SKIP";
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_RENEW_SKIP = "DHCPSRV_HOOK_LEASE4_RENEW_SKIP";
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_SELECT_SKIP = "DHCPSRV_HOOK_LEASE4_SELECT_SKIP";
@@ -258,6 +260,8 @@ extern const isc::log::MessageID DHCPSRV_SUBNET4_SELECT_NO_USABLE_ADDRESS = "DHC
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_ADDRESS_NO_MATCH = "DHCPSRV_SUBNET6_SELECT_BY_ADDRESS_NO_MATCH";
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_ID_NO_MATCH = "DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_ID_NO_MATCH";
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_NO_MATCH = "DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_NO_MATCH";
+extern const isc::log::MessageID DHCPSRV_TEMPLATE_EVAL_ERROR = "DHCPSRV_TEMPLATE_EVAL_ERROR";
+extern const isc::log::MessageID DHCPSRV_TEMPLATE_EVAL_RESULT = "DHCPSRV_TEMPLATE_EVAL_RESULT";
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_CALLBACK_FAILED = "DHCPSRV_TIMERMGR_CALLBACK_FAILED";
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_REGISTER_TIMER = "DHCPSRV_TIMERMGR_REGISTER_TIMER";
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION = "DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION";
@@ -322,6 +326,8 @@ const char* values[] = {
     "DHCPSRV_DHCP_DDNS_SENDER_STARTED", "NameChangeRequest sender has been started: %1",
     "DHCPSRV_DHCP_DDNS_SENDER_STOPPED", "NameChangeRequest sender has been stopped.",
     "DHCPSRV_DHCP_DDNS_SUSPEND_UPDATES", "DHCP_DDNS updates are being suspended.",
+    "DHCPSRV_EVAL_ERROR", "%1: Expression '%2' evaluated to %3",
+    "DHCPSRV_EVAL_RESULT", "%1: Expression '%2' evaluated to %3",
     "DHCPSRV_HOOK_LEASE4_RECOVER_SKIP", "DHCPv4 lease %1 was not recovered from the declined state because a callout set the skip status.",
     "DHCPSRV_HOOK_LEASE4_RENEW_SKIP", "DHCPv4 lease was not renewed because a callout set the skip flag.",
     "DHCPSRV_HOOK_LEASE4_SELECT_SKIP", "Lease4 creation was skipped, because of callout skip flag.",
@@ -524,6 +530,8 @@ const char* values[] = {
     "DHCPSRV_SUBNET6_SELECT_BY_ADDRESS_NO_MATCH", "No subnet matches address: %1",
     "DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_ID_NO_MATCH", "No subnet matches interface id: %1",
     "DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_NO_MATCH", "No subnet matches interface: %1",
+    "DHCPSRV_TEMPLATE_EVAL_ERROR", "%1: Expression '%2' evaluated to %3",
+    "DHCPSRV_TEMPLATE_EVAL_RESULT", "%1: Expression '%2' evaluated to %3",
     "DHCPSRV_TIMERMGR_CALLBACK_FAILED", "running handler for timer %1 caused exception: %2",
     "DHCPSRV_TIMERMGR_REGISTER_TIMER", "registering timer: %1, using interval: %2 ms",
     "DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION", "running operation for timer: %1",
index e57a2eda80fb1c1e92756610f5bafcbd83ab60b6..788a84417fc4b92625b974697cd47328e74ccb05 100644 (file)
@@ -57,6 +57,8 @@ extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_NCR_SENT;
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SENDER_STARTED;
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SENDER_STOPPED;
 extern const isc::log::MessageID DHCPSRV_DHCP_DDNS_SUSPEND_UPDATES;
+extern const isc::log::MessageID DHCPSRV_EVAL_ERROR;
+extern const isc::log::MessageID DHCPSRV_EVAL_RESULT;
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_RECOVER_SKIP;
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_RENEW_SKIP;
 extern const isc::log::MessageID DHCPSRV_HOOK_LEASE4_SELECT_SKIP;
@@ -259,6 +261,8 @@ extern const isc::log::MessageID DHCPSRV_SUBNET4_SELECT_NO_USABLE_ADDRESS;
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_ADDRESS_NO_MATCH;
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_ID_NO_MATCH;
 extern const isc::log::MessageID DHCPSRV_SUBNET6_SELECT_BY_INTERFACE_NO_MATCH;
+extern const isc::log::MessageID DHCPSRV_TEMPLATE_EVAL_ERROR;
+extern const isc::log::MessageID DHCPSRV_TEMPLATE_EVAL_RESULT;
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_CALLBACK_FAILED;
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_REGISTER_TIMER;
 extern const isc::log::MessageID DHCPSRV_TIMERMGR_RUN_TIMER_OPERATION;
index afa9b0415ede94c954ed038ba33c0ba19ad0bfd2..c6cacd017bdc208789495a6e31424e71a9d4f9c0 100644 (file)
@@ -302,6 +302,17 @@ have been experienced. Any such errors should have preceding entries in the
 log with details. No further attempts to communicate with kea-dhcp-ddns will
 be made without intervention.
 
+% DHCPSRV_EVAL_ERROR %1: Expression '%2' evaluated to %3
+This error message indicates that there a problem was encountered while
+evaluating an expression of a client class.
+A description of the problem is printed.
+
+% DHCPSRV_EVAL_RESULT %1: Expression '%2' evaluated to %3
+Logged at debug log level 50.
+This debug message indicates that the expression of a client class has been
+successfully evaluated. The client class name and the result value of the
+evaluation are printed.
+
 % DHCPSRV_HOOK_LEASE4_RECOVER_SKIP DHCPv4 lease %1 was not recovered from the declined state because a callout set the skip status.
 Logged at debug log level 40.
 This debug message is printed when a callout installed on lease4_recover
@@ -1428,6 +1439,17 @@ Logged at debug log level 40.
 A debug message issued when the server was unable to select a subnet using
 the specified interface name.
 
+% DHCPSRV_TEMPLATE_EVAL_ERROR %1: Expression '%2' evaluated to %3
+This error message indicates that there a problem was encountered while
+evaluating an expression of a template client class.
+A description of the problem is printed.
+
+% DHCPSRV_TEMPLATE_EVAL_RESULT %1: Expression '%2' evaluated to %3
+Logged at debug log level 50.
+This debug message indicates that the expression of a template client class has
+been successfully evaluated. The client class name and the result value of the
+evaluation are printed.
+
 % DHCPSRV_TIMERMGR_CALLBACK_FAILED running handler for timer %1 caused exception: %2
 This error message is emitted when the timer elapsed and the
 operation associated with this timer has thrown an exception.
index 4225e7f2b096c089cd798b8b1a195fbabcd55be2..c30e59a6687f85a08aa07fbf385272653824dc8f 100644 (file)
@@ -369,9 +369,3 @@ option was found.
 Logged at debug log level 55.
 This debug message indicates that the expression has been evaluated
 and vendor option was not found.
-
-% EVAL_RESULT %1: Expression %2 evaluated to %3
-Logged at debug log level 50.
-This debug message indicates that the expression has been evaluated
-to said value. This message is mostly useful during debugging of the
-client classification expressions.
index 64e230f7491ecfd7c79f52d144cc3dce88d660ac..e5d40b7c71fee295db0bb808a3c0080d277f2ef0 100644 (file)
@@ -8,7 +8,6 @@
     % DHCP4_CLASS_ASSIGNED: 3
     % DHCP4_PACKET_QUEUE_FULL: 2
     % DHCP4_CONFIG_RECEIVED: 2
-    % EVAL_RESULT: 15
     % DHCP6_CLASSES_ASSIGNED: 8
     % DHCP6_CLASS_ASSIGNED: 3
     % DHCP6_PACKET_QUEUE_FULL: 2