]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Enhance the d2 logging code
authorShawn Routhier <sar@isc.org>
Tue, 9 Jun 2015 20:13:33 +0000 (13:13 -0700)
committerShawn Routhier <sar@isc.org>
Tue, 9 Jun 2015 20:13:33 +0000 (13:13 -0700)
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'

1  2 
ChangeLog
doc/guide/logging.xml
src/bin/d2/nc_trans.cc

diff --cc ChangeLog
index bb4999656b8d61d8d01d1b37d26f95bc7b58dfd8,3aa20db439dfe83308b57ed079b8d50ccfd830e4..d8f4509d1061c688031d4567c8b999c0f6e3b745
+++ 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 <TBD>)
 -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.
Simple merge
index 9531683560e337996b34ef5bc230f415fe028ad0,96c138915a9e19c41c812649bf661593f6c9e505..12afe867abc0bdfc4f504185e600405f8557201c
@@@ -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.
          // 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);
      }
  }