Commit f1df4a73 authored by Marcin Siodelski's avatar Marcin Siodelski

[3806] Corrections in the User Guide.

Also, renamed loggers.
parent 8e4f5d8a
......@@ -180,15 +180,15 @@
</listitem>
<listitem>
<simpara><command>kea-dhcp4.hooks</command> - this logger is used
by the hooks framework to log messages related to the execution of
callouts for various hook points. This logger doesn't log messages
which pertain to actions on the server side being the result of
the callout execution, e.g. skipping packet parsing by the server
by the libkea-hooks library to log messages related to the execution
of callouts for various hook points. This logger doesn't log messages
pertaining to actions on the server, being the result of the
callout execution, e.g. skipping packet parsing by the server
because the callout has indicated that it has parsed the packet
already.</simpara>
</listitem>
<listitem>
<simpara><command>kea-dhcp4.hostname</command> - this logger is
<simpara><command>kea-dhcp4.ddns</command> - this logger is
used by the DHCPv4 server to log messages related to the Client
FQDN and Hostname option processing. It also includes log messages
related to the relevant DNS updates.</simpara>
......@@ -200,11 +200,10 @@
and adding new reservations.</simpara>
</listitem>
<listitem>
<simpara><command>kea-dhcp4.lease</command> - this logger is used
<simpara><command>kea-dhcp4.leases</command> - this logger is used
by the DHCPv4 server to log messages related to the lease allocation.
These messages are logged for each processed packet. The messages
include detailed information about the allocated or offered leases,
errors during the lease allocation etc.
The messages include detailed information about the allocated or
offered leases, errors during the lease allocation etc.
</simpara>
</listitem>
<listitem>
......@@ -215,7 +214,7 @@
using options contained in the received packets.</simpara>
</listitem>
<listitem>
<simpara><command>kea-dhcp4.packet</command> - this logger
<simpara><command>kea-dhcp4.packets</command> - this logger
is mostly used to log messages related to transmission of the DHCPv4
packets, i.e. packet reception and sending a response. Such messages
include the information about the source and destination IP addresses
......@@ -227,7 +226,7 @@
</simpara>
</listitem>
<listitem>
<simpara><command>kea-dhcp4.server-hook</command> - this logger is
<simpara><command>kea-dhcp4.server-hooks</command> - this logger is
used by the DHCPv4 server to log messages pertaining to the
preparations for the callouts execution by the server and to the
actions taken by the server as a result of the callouts execution.
......
......@@ -22,18 +22,18 @@ namespace dhcp {
const char* DHCP4_ROOT_LOGGER_NAME = "kea-dhcp4";
const char* DHCP4_APP_LOGGER_NAME = "dhcp4";
const char* DHCP4_BAD_PACKET_LOGGER_NAME = "bad-packet";
const char* DHCP4_PACKET_LOGGER_NAME = "packet";
const char* DHCP4_BAD_PACKET_LOGGER_NAME = "bad-packets";
const char* DHCP4_PACKET_LOGGER_NAME = "packets";
const char* DHCP4_OPTIONS_LOGGER_NAME = "options";
const char* DHCP4_HOSTNAME_LOGGER_NAME = "hostname";
const char* DHCP4_LEASE_LOGGER_NAME = "lease";
const char* DHCP4_DDNS_LOGGER_NAME = "ddns";
const char* DHCP4_LEASE_LOGGER_NAME = "leases";
const char* DHCP4_SRV_HOOKS_LOGGER_NAME = "server-hooks";
isc::log::Logger dhcp4_logger(DHCP4_APP_LOGGER_NAME);
isc::log::Logger bad_packet_logger(DHCP4_BAD_PACKET_LOGGER_NAME);
isc::log::Logger packet_logger(DHCP4_PACKET_LOGGER_NAME);
isc::log::Logger options_logger(DHCP4_OPTIONS_LOGGER_NAME);
isc::log::Logger hostname_logger(DHCP4_HOSTNAME_LOGGER_NAME);
isc::log::Logger ddns_logger(DHCP4_DDNS_LOGGER_NAME);
isc::log::Logger lease_logger(DHCP4_LEASE_LOGGER_NAME);
isc::log::Logger srv_hooks_logger(DHCP4_SRV_HOOKS_LOGGER_NAME);
......
......@@ -84,7 +84,7 @@ extern const char* DHCP4_PACKET_LOGGER_NAME;
extern const char* DHCP4_OPTIONS_LOGGER_NAME;
/// @brief Name of the logger for hostname or FQDN processing.
extern const char* DHCP4_HOSTNAME_LOGGER_NAME;
extern const char* DHCP4_DDNS_LOGGER_NAME;
/// @brief Name of the logger for lease allocation logic.
extern const char* DHCP4_LEASE_LOGGER_NAME;
......@@ -102,7 +102,7 @@ extern isc::log::Logger dhcp4_logger;
/// @brief Logger for rejected packets.
///
/// Here "bad packet" are packets that are either dropped (i.e malformed,
/// Here "bad packets" are packets that are either dropped (i.e malformed,
/// unsupported types) or packets that are rejected and NAKed for logical
/// reasons.
extern isc::log::Logger bad_packet_logger;
......@@ -119,11 +119,11 @@ extern isc::log::Logger packet_logger;
/// DHCP options
extern isc::log::Logger options_logger;
/// @brief Logger for hostname or FQDN processing.
/// @brief Logger for Hostname or FQDN processing.
///
/// This logger is used to issue log messages related to processing the
/// hostnames, FQDNs and sending name change requests to D2.
extern isc::log::Logger hostname_logger;
extern isc::log::Logger ddns_logger;
/// @brief Logger for lease allocation logic.
///
......
......@@ -883,7 +883,7 @@ Dhcpv4Srv::processClientName(Dhcpv4Exchange& ex) {
Option4ClientFqdnPtr fqdn = boost::dynamic_pointer_cast<Option4ClientFqdn>
(ex.getQuery()->getOption(DHO_FQDN));
if (fqdn) {
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL, DHCP4_CLIENT_FQDN_PROCESS)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL, DHCP4_CLIENT_FQDN_PROCESS)
.arg(ex.getQuery()->getLabel());
processClientFqdnOption(ex);
......@@ -891,7 +891,7 @@ Dhcpv4Srv::processClientName(Dhcpv4Exchange& ex) {
OptionStringPtr hostname = boost::dynamic_pointer_cast<OptionString>
(ex.getQuery()->getOption(DHO_HOST_NAME));
if (hostname) {
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL, DHCP4_CLIENT_HOSTNAME_PROCESS)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL, DHCP4_CLIENT_HOSTNAME_PROCESS)
.arg(ex.getQuery()->getLabel());
processHostnameOption(ex);
}
......@@ -905,7 +905,7 @@ Dhcpv4Srv::processClientName(Dhcpv4Exchange& ex) {
// from the log. We don't want to throw an exception here because,
// it will impact the processing of the whole packet. We rather want
// the processing to continue, even if the client's name is wrong.
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_NAME_PROC_FAIL)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_NAME_PROC_FAIL)
.arg(ex.getQuery()->getLabel())
.arg(e.what());
}
......@@ -917,7 +917,7 @@ Dhcpv4Srv::processClientFqdnOption(Dhcpv4Exchange& ex) {
Option4ClientFqdnPtr fqdn = boost::dynamic_pointer_cast<
Option4ClientFqdn>(ex.getQuery()->getOption(DHO_FQDN));
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_FQDN_DATA)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_FQDN_DATA)
.arg(ex.getQuery()->getLabel())
.arg(fqdn->toText());
......@@ -957,7 +957,7 @@ Dhcpv4Srv::processClientFqdnOption(Dhcpv4Exchange& ex) {
// If we don't store the option in the response message, we will have to
// propagate it in the different way to the functions which acquire the
// lease. This would require modifications to the API of this class.
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_RESPONSE_FQDN_DATA)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_RESPONSE_FQDN_DATA)
.arg(ex.getQuery()->getLabel())
.arg(fqdn_resp->toText());
ex.getResponse()->addOption(fqdn_resp);
......@@ -969,7 +969,7 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
OptionStringPtr opt_hostname = boost::dynamic_pointer_cast<OptionString>
(ex.getQuery()->getOption(DHO_HOST_NAME));
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_HOSTNAME_DATA)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_CLIENT_HOSTNAME_DATA)
.arg(ex.getQuery()->getLabel())
.arg(opt_hostname->getValue());
......@@ -988,7 +988,7 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
/// @todo It would be more liberal to accept this and let it fall into
/// the case of replace or less than two below.
if (label_count == 0) {
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_EMPTY_HOSTNAME)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_EMPTY_HOSTNAME)
.arg(ex.getQuery()->getLabel());
return;
}
......@@ -1033,7 +1033,7 @@ Dhcpv4Srv::processHostnameOption(Dhcpv4Exchange& ex) {
opt_hostname_resp->setValue(d2_mgr.qualifyName(hostname, false));
}
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_RESPONSE_HOSTNAME_DATA)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_RESPONSE_HOSTNAME_DATA)
.arg(ex.getQuery()->getLabel())
.arg(opt_hostname_resp->getValue());
ex.getResponse()->addOption(opt_hostname_resp);
......@@ -1101,7 +1101,7 @@ queueNameChangeRequest(const isc::dhcp_ddns::NameChangeType chg_type,
try {
dhcid = computeDhcid(lease);
} catch (const DhcidComputeError& ex) {
LOG_ERROR(hostname_logger, DHCP4_DHCID_COMPUTE_ERROR)
LOG_ERROR(ddns_logger, DHCP4_DHCID_COMPUTE_ERROR)
.arg(lease->toText())
.arg(ex.what());
return;
......@@ -1117,7 +1117,7 @@ queueNameChangeRequest(const isc::dhcp_ddns::NameChangeType chg_type,
lease->valid_lft_),
lease->valid_lft_));
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_QUEUE_NCR)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL_DATA, DHCP4_QUEUE_NCR)
.arg(chg_type == CHG_ADD ? "add" : "remove")
.arg(ncr->toText());
......@@ -1311,7 +1311,7 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
lease->hostname_ = CfgMgr::instance().getD2ClientMgr()
.generateFqdn(lease->addr_, static_cast<bool>(fqdn));
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL, DHCP4_RESPONSE_HOSTNAME_GENERATE)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL, DHCP4_RESPONSE_HOSTNAME_GENERATE)
.arg(query->getLabel())
.arg(lease->hostname_);
......@@ -1333,7 +1333,7 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
}
} catch (const Exception& ex) {
LOG_ERROR(hostname_logger, DHCP4_NAME_GEN_UPDATE_FAIL)
LOG_ERROR(ddns_logger, DHCP4_NAME_GEN_UPDATE_FAIL)
.arg(query->getLabel())
.arg(lease->hostname_)
.arg(ex.what());
......@@ -1368,12 +1368,12 @@ Dhcpv4Srv::assignLease(Dhcpv4Exchange& ex) {
// real allocation.
if (!fake_allocation && CfgMgr::instance().ddnsEnabled()) {
try {
LOG_DEBUG(hostname_logger, DBG_DHCP4_DETAIL, DHCP4_NCR_CREATE)
LOG_DEBUG(ddns_logger, DBG_DHCP4_DETAIL, DHCP4_NCR_CREATE)
.arg(query->getLabel());
createNameChangeRequests(lease, ctx->old_lease_);
} catch (const Exception& ex) {
LOG_ERROR(hostname_logger, DHCP4_NCR_CREATION_FAILED)
LOG_ERROR(ddns_logger, DHCP4_NCR_CREATION_FAILED)
.arg(query->getLabel())
.arg(ex.what());
}
......@@ -2195,7 +2195,7 @@ void
Dhcpv4Srv::d2ClientErrorHandler(const
dhcp_ddns::NameChangeSender::Result result,
dhcp_ddns::NameChangeRequestPtr& ncr) {
LOG_ERROR(hostname_logger, DHCP4_DDNS_REQUEST_SEND_FAILED).
LOG_ERROR(ddns_logger, DHCP4_DDNS_REQUEST_SEND_FAILED).
arg(result).arg((ncr ? ncr->toText() : " NULL "));
// We cannot communicate with kea-dhcp-ddns, suspend further updates.
/// @todo We may wish to revisit this, but for now we will simply turn
......
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