From: Marcin Siodelski Date: Fri, 17 Apr 2015 08:35:57 +0000 (+0200) Subject: [3699] Added traces for cases when no host is found. X-Git-Tag: trac3764a_base~4^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da05ae70731bf55b015fc478c8cf60c6acb3b02d;p=thirdparty%2Fkea.git [3699] Added traces for cases when no host is found. --- diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc index 4c869886e2..bd173e6ec2 100644 --- a/src/lib/dhcpsrv/cfg_hosts.cc +++ b/src/lib/dhcpsrv/cfg_hosts.cc @@ -233,7 +233,7 @@ CfgHosts::get4(const SubnetID& subnet_id, const IOAddress& address) const { for (ConstHostCollection::const_iterator host = hosts.begin(); host != hosts.end(); ++host) { if ((*host)->getIPv4SubnetID() == subnet_id) { - LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE_DETAIL_DATA, + LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_HOST) .arg(subnet_id) .arg(address.toText()) @@ -241,6 +241,9 @@ CfgHosts::get4(const SubnetID& subnet_id, const IOAddress& address) const { return (*host); } } + + LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL) + .arg(subnet_id).arg(address.toText()); return (ConstHostPtr()); } @@ -297,10 +300,14 @@ CfgHosts::getHostInternal6(const SubnetID& subnet_id, getAllInternal6(subnet_id, address, storage); switch (storage.size()) { case 0: + LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, + HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL) + .arg(subnet_id) + .arg(address.toText()); return (HostPtr()); case 1: - LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE_DETAIL_DATA, + LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_HOST) .arg(subnet_id) .arg(address.toText()) @@ -403,7 +410,7 @@ CfgHosts::getHostInternal(const SubnetID& subnet_id, const bool subnet6, } if (host) { - LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE_DETAIL_DATA, + LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID) .arg(subnet_id) .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)") diff --git a/src/lib/dhcpsrv/hosts_messages.mes b/src/lib/dhcpsrv/hosts_messages.mes index 4d3656fe35..8d95bad2e3 100644 --- a/src/lib/dhcpsrv/hosts_messages.mes +++ b/src/lib/dhcpsrv/hosts_messages.mes @@ -93,6 +93,10 @@ arguments specify subnet id and IPv4 address respectively. This debug message logs the details of the host found using the subnet id and IPv4 address. +% HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id %1 and address %2 +This debug message is issued when no host was found for the specified +subnet id and IPv4 address. + % HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for subnet id %1 and including IPv6 address %2 This debug message is issued when retrieveing a host connected to the specific subnet and having the specific IPv6 address reserved. The @@ -102,6 +106,10 @@ arguments specify subnet id and IPv6 address respectively. This debug message logs the details of the host found using the subnet id and IPv6 address. +% HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6_NULL host not found using subnet id %1 and address %2 +This debug message is issued when no host was found using the specified +subnet if and IPv6 address. + % HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID get one host with %1 reservation for subnet id %2, HWADDR %3, DUID %4 This debug message is issued when retrieving the host holding IPv4 or IPv6 reservations, which is connected to the specific subnet and is