Commit da05ae70 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3699] Added traces for cases when no host is found.

parent 32413af6
......@@ -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<Storage>(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)")
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment