From: Shawn Routhier Date: Tue, 9 Jun 2015 20:13:33 +0000 (-0700) Subject: [master] Enhance the d2 logging code X-Git-Tag: trac3732a_base~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fbe08234049de6ef67bb5cdb244d180a7a4c3a9;p=thirdparty%2Fkea.git [master] Enhance the d2 logging code Split the d2 logging code into multiple loggers to allow administrators to more easily contol the amount of debug messages during debugging. Merge branch 'trac3808' --- 4fbe08234049de6ef67bb5cdb244d180a7a4c3a9 diff --cc ChangeLog index bb4999656b,3aa20db439..d8f4509d10 --- a/ChangeLog +++ b/ChangeLog @@@ -1,78 -1,11 +1,85 @@@ -xxx [func] sar ++943. [func] sar + Split the DHCP-DDNS logging messages amongst several loggers to + allow the administrator finer control over debugging messages. + Messages pertaining to the name change requests processing include + an ID, currently the DHCID, to identify the transactions. + (Trac #3808, git ) + -929 [build] fdupont +942. [func] tomek + 18 new statistics added in DHCPv4 server: generic packet counters, + per packet type counters, parsing failure and packet drops. + (Trac #3794, git a61f40c44910a09699a9a566a5ec35ab758564ba) + +941. [bug] marcin + Configuration parser for host reservations returns an error + when an unsupported parameter is specified. + (Trac 3810, git 54ee0f6328a303c366dd8239e768dfc4a23a5d9b) + +940. [bug] fdupont + DHCPv4 server drops DHCPRELEASE messages sent from a bad + location (i.e., no subnet can be selected) + (Trac 3504, git f0f13ac74779f76ed7af91bd5dab3d11ba00be79) + +939. [bug] fdupont + Small fix in HooksDhcpv4SrvTest.subnet4SelectSimple unit-test. + (Trac 3881, git a21afdffec41fceb61e6760d4108d670b2eabe75) + +938. [build] fdupont + Removed Python from the log library (code, message compiler and + documentation) + (Trac #3734, git d24b7c9716c6eb7a3e9dd2cb3fd2d1bfe4e1201f) + +937. [bug] fdupont + The log ID LOG_UNRECOGNISED_DIRECTIVE was changed to + LOG_UNRECOGNIZED_DIRECTIVE to follow US English spelling. + (Trac #3762, git 235e3304746352e9341008225f9f2392586a9f66) + +936. [bug] fdupont + Added an ASSERT to avoid a crash in HooksDhcpv4SrvTest + subnet4SelectSimple unit test. Fixed out of bounds vector accesses + in perfdhcp (which should not be able to handle links + with long (i.e., more than 6 bytes) link-layer addresses). + (Trac #3868, git c20f47e19d6060605c0611754db7b66b08553caa) + +935. [bug] fdupont + Fixed 3 out of bounds accesses on vectors in DHCP++ code. + (Trac #3854, git de263ad0008f3494a85592f78db1ec662b68e689) + +934. [bug] fdupont + Renamed the DHCP-DDNS constant INVALID_SOCKET to SOCKET_NOT_VALID + to avoid conflicting with a constant of that name defined on some + operating systems. + (Trac #3861, git 28205225ceed03ff3126e43cd06cedbaa7d8d657) + +933. [func]* marcin + DHCPv4 server by default identifies a client using the + client-identifier, if present. The new configuration + parameter 'match-client-id' allows for disabling this + behavior, i.e. 'chaddr' field is used to identify the + client instead. + (Trac #3747, git b9dc6ffd0f3396e9da8e0c83fd82164b8b8af011) + +932. [func] kalmus + MySQL schema has been extended with tables that can store + host reservation. This ticket updates database schema only, + the tables are not in use yet. + (Trac #3567, git d2cd5d53b3f31422a342c9bb8946dad9ed1ea032) + +931. [func] marcin + Improved log messages emitted by the DHCPv4 server. Also, + the server is now using multiple distinct loggers for logging + messages pertaining to different functional parts of the + code, e.g. packet transmission, lease allocation, DDNS etc. + For complete list of logger names see User Guide. + (Trac #3806, git 7b148c2dd5e2696a541883223ce1efd2de81f143) + +930. [func] tomek + Statistics Manager is now implemented. There is a new library + libkea-stats that governs statistics collection. Its usage will + be added in the upcoming tickets. + (Trac #3793, git 68e9554ecabfc2a79731eeec1c706522e4d39332) + +929. [build] fdupont Corrected problem in build system whereby specifying an installation directory on the "configure" command line that included a "+" in the name caused the build to fail. diff --cc src/bin/d2/nc_trans.cc index 9531683560,96c138915a..12afe867ab --- a/src/bin/d2/nc_trans.cc +++ b/src/bin/d2/nc_trans.cc @@@ -183,10 -183,10 +183,10 @@@ NameChangeTransaction::sendUpdate(cons d2_params->getDnsServerTimeout(), tsig_key_); // Message is on its way, so the next event should be NOP_EVT. postNextEvent(NOP_EVT); - LOG_DEBUG(dctl_logger, DBGLVL_TRACE_DETAIL, + LOG_DEBUG(d2_to_dns_logger, DBGLVL_TRACE_DETAIL, DHCP_DDNS_UPDATE_REQUEST_SENT) - .arg(getRequestId()) ++ .arg(getRequestId()) .arg(comment) - .arg(getTransactionKey().toStr()) .arg(current_server_->toText()); } catch (const std::exception& ex) { // We were unable to initiate the send. @@@ -197,7 -197,9 +197,9 @@@ // DNSClient callback. Any problem here most likely means the request // is corrupt in some way and cannot be completed, therefore we will // log it and transition it to failure. - LOG_ERROR(dctl_logger, DHCP_DDNS_TRANS_SEND_ERROR).arg(ex.what()); + LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_TRANS_SEND_ERROR) - .arg(getRequestId()) ++ .arg(getRequestId()) + .arg(ex.what()); transition(PROCESS_TRANS_FAILED_ST, UPDATE_FAILED_EVT); } }