Commit e17e79bc authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Finishing merge of (forensic/legal logging to database)

parents 51fd66d3 8387bc7d
1359. [func] fdupont
Extended forensic (aka legal) logging with database capability.
(Trac #5420, git xxx)
1358. [build,bug] fdupont
Cassandra build fixes for macOS.
(Trac #5494, git xxx)
(Trac #5494, git 51fd66d364fab2da37fc12557b78bf9863df78d3)
1357. [bug] rcgoodfellow
Fixed bug in kea-admon causing error on lease-dump.
(github #61, git xxx)
(github #61, git 2c9454ec56edc8f3cff8a23329f53ced0d172280)
1356. [func] andreipavelQ,tomek
The logging configuration is now applied early, which helps
......
......@@ -267,7 +267,7 @@
<!-- @todo: document lease file upgrades once they are implemented in kea-admin -->
</section>
<section>
<section id="mysql-database">
<title>MySQL</title>
<para>
......@@ -408,7 +408,7 @@ $ <userinput>kea-admin lease-upgrade mysql -u <replaceable>database-user</replac
</section>
</section> <!-- end of MySQL sections -->
<section>
<section id="pgsql-database">
<title>PostgreSQL</title>
<para>
......@@ -589,7 +589,7 @@ $ <userinput>kea-admin lease-upgrade pgsql -u <replaceable>database-user</replac
</section>
</section> <!-- end of PostgreSQL sections -->
<section>
<section id="cql-database">
<title>CQL (Cassandra)</title>
<para>
......
......@@ -7,6 +7,7 @@
-->
<!-- Converted by db4-upgrade version 1.1 -->
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="hooks-libraries">
<title>Hooks Libraries</title>
<section xml:id="hooks-libraries-introduction">
<title>Introduction</title>
......@@ -439,15 +440,20 @@ path/base-name.CCYYMMDD.txt
(for new leases) and lease4_renew (for renewed leases) hooks.
</para>
<para>
An entry is a single string with no embedded end-of-line markers
and has the following sections:
An entry is a single string with no embedded end-of-line markers,
a prepended timestamp and has the following sections:
<screen>
address duration device-id {client-info} {relay-info}
timestamp address duration device-id {client-info} {relay-info}
</screen>
</para>
<para>
Where:
<itemizedlist>
<listitem><para>
timestamp - the current date and time the log entry was written
in "%Y-%m-%d %H:%M:%S %Z" strftime format ("%Z" is the time zone
name).
</para></listitem>
<listitem><para>
address - the leased IPv4 address given out and whether it was
assigned or renewed.
......@@ -477,10 +483,7 @@ address duration device-id {client-info} {relay-info}
For instance (line breaks added for readability, they would not
be present in the log file).
<screen>
Address: 192.2.1.100 has been renewed for 1 hrs 52 min 15 secs to a device with
hardware address: hwtype=1 08:00:2b:02:3f:4e, client-id: 17:34:e2:ff:09:92:54
connected via relay at address: 192.2.16.33, identified by circuit-id:
68:6f:77:64:79 and remote-id: 87:f6:79:77:ef
2018-01-06 01:02:03 CET Address: 192.2.1.100 has been renewed for 1 hrs 52 min 15 secs to a device with hardware address: hwtype=1 08:00:2b:02:3f:4e, client-id: 17:34:e2:ff:09:92:54 connected via relay at address: 192.2.16.33, identified by circuit-id: 68:6f:77:64:79 and remote-id: 87:f6:79:77:ef
</screen>
</para>
<para>
......@@ -493,7 +496,7 @@ connected via relay at address: 192.2.16.33, identified by circuit-id:
<para>
<command>lease4-add:</command>
<screen>
Administrator added a lease of address: *address* to a device with hardware address: *device-id*
*timestamp* Administrator added a lease of address: *address* to a device with hardware address: *device-id*
</screen>
Dependent on the arguments of the add command, it may also include the
client-id and duration.
......@@ -501,13 +504,13 @@ Administrator added a lease of address: *address* to a device with hardware addr
<para>
Example:
<screen>
Administrator added a lease of address: 192.0.2.202 to a device with hardware address: 1a:1b:1c:1d:1e:1f for 1 days 0 hrs 0 mins 0 secs
2018-01-06 01:02:03 CET Administrator added a lease of address: 192.0.2.202 to a device with hardware address: 1a:1b:1c:1d:1e:1f for 1 days 0 hrs 0 mins 0 secs
</screen>
</para>
<para>
<command>lease4-update:</command>
<screen>
Administrator updated information on the lease of address: *address* to a device with hardware address: *device-id*
*timestamp* Administrator updated information on the lease of address: *address* to a device with hardware address: *device-id*
</screen>
Dependent on the arguments of the update command, it may also include the
client-id and lease duration.
......@@ -515,27 +518,27 @@ Administrator updated information on the lease of address: *address* to a device
<para>
Example:
<screen>
Administrator updated information on the lease of address: 192.0.2.202 to a device with hardware address: 1a:1b:1c:1d:1e:1f, client-id: 1234567890
2018-01-06 01:02:03 CET Administrator updated information on the lease of address: 192.0.2.202 to a device with hardware address: 1a:1b:1c:1d:1e:1f, client-id: 1234567890
</screen>
</para>
<para>
<command>lease4-del:</command>
Deletes have two forms, one by address and one by identifier and identifier type:
<screen>
Administrator deleted the lease for address: *address*
*timestamp* Administrator deleted the lease for address: *address*
</screen>
or
<screen>
Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
*timestamp* Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
</screen>
Currently only a type of @b hw-address (hardware address) is supported.
</para>
<para>
Examples:
<screen>
Administrator deleted the lease for address: 192.0.2.202
2018-01-06 01:02:03 CET Administrator deleted the lease for address: 192.0.2.202
Administrator deleted a lease for a device identified by: hw-address of 1a:1b:1c:1d:1e:1f
2018-01-06 01:02:12 CET Administrator deleted a lease for a device identified by: hw-address of 1a:1b:1c:1d:1e:1f
</screen>
</para>
</section>
......@@ -548,15 +551,20 @@ Administrator deleted a lease for a device identified by: hw-address of 1a:1b:1c
(for renewed leases) and lease6_rebind (for rebound leases).
</para>
<para>
An entry is a single string with no embedded end-of-line markers
and has the following sections:
An entry is a single string with no embedded end-of-line markers,
a prepended timestamp and has the following sections:
<screen>
address duration device-id {relay-info}*
timestamp address duration device-id {relay-info}*
</screen>
</para>
<para>
Where:
<itemizedlist>
<listitem><para>
timestamp - the current date and time the log entry was written
in "%Y-%m-%d %H:%M:%S %Z" strftime format ("%Z" is the time zone
name).
</para></listitem>
<listitem><para>
address - the leased IPv6 address or prefix given out and whether
it was assigned or renewed.
......@@ -585,11 +593,7 @@ address duration device-id {relay-info}*
For instance (line breaks added for readability, they would not
be present in the log file).
<screen>
Address:2001:db8:1:: has been assigned for 0 hrs 11 mins 53 secs to a device with
DUID: 17:34:e2:ff:09:92:54 and hardware address: hwtype=1 08:00:2b:02:3f:4e
(from Raw Socket) connected via relay at address: fe80::abcd for client on
link address: 3001::1, hop count: 1, identified by remote-id:
01:02:03:04:0a:0b:0c:0d:0e:0f and subscriber-id: 1a:2b:3c:4d:5e:6f
2018-01-06 01:02:03 PST Address:2001:db8:1:: has been assigned for 0 hrs 11 mins 53 secs to a device with DUID: 17:34:e2:ff:09:92:54 and hardware address: hwtype=1 08:00:2b:02:3f:4e (from Raw Socket) connected via relay at address: fe80::abcd for client on link address: 3001::1, hop count: 1, identified by remote-id: 01:02:03:04:0a:0b:0c:0d:0e:0f and subscriber-id: 1a:2b:3c:4d:5e:6f
</screen>
</para>
<para>
......@@ -602,47 +606,47 @@ link address: 3001::1, hop count: 1, identified by remote-id:
<para>
<command>lease6-add:</command>
<screen>
Administrator added a lease of address: *address* to a device with DUID: *DUID*
*timestamp* Administrator added a lease of address: *address* to a device with DUID: *DUID*
</screen>
Dependent on the arguments of the add command, it may also include the hardware address and duration.
</para>
<para>
Example:
<screen>
Administrator added a lease of address: 2001:db8::3 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24 for 1 days 0 hrs 0 mins 0 secs
2018-01-06 01:02:03 PST Administrator added a lease of address: 2001:db8::3 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24 for 1 days 0 hrs 0 mins 0 secs
</screen>
</para>
<para>
<command>lease6-update:</command>
<screen>
Administrator updated information on the lease of address: *address* to a device with DUID: *DUID*
*timestamp* Administrator updated information on the lease of address: *address* to a device with DUID: *DUID*
</screen>
Dependent on the arguments of the update command, it may also include the hardware address and lease duration.
</para>
<para>
Example:
<screen>
Administrator updated information on the lease of address: 2001:db8::3 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24, hardware address: 1a:1b:1c:1d:1e:1f
2018-01-06 01:02:03 PST Administrator updated information on the lease of address: 2001:db8::3 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24, hardware address: 1a:1b:1c:1d:1e:1f
</screen>
</para>
<para>
<command>lease6-del:</command>
Deletes have two forms, one by address and one by identifier and identifier type:
<screen>
Administrator deleted the lease for address: *address*
*timestamp* Administrator deleted the lease for address: *address*
</screen>
or
<screen>
Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
*timestamp* Administrator deleted a lease for a device identified by: *identifier-type* of *identifier*
</screen>
Currently only a type of DUID is supported.
</para>
<para>
Examples:
<screen>
Administrator deleted the lease for address: 2001:db8::3
2018-01-06 01:02:03 PST Administrator deleted the lease for address: 2001:db8::3
Administrator deleted a lease for a device identified by: duid of 1a:1b:1c:1d:1e:1f:20:21:22:23:24
2018-01-06 01:02:11 PST Administrator deleted a lease for a device identified by: duid of 1a:1b:1c:1d:1e:1f:20:21:22:23:24
</screen>
</para>
</section>
......@@ -759,6 +763,60 @@ Administrator deleted a lease for a device identified by: duid of 1a:1b:1c:1d:1e
to learn more about user contexts in Kea configuration.
</para>
</section>
<section id="forensic-log-database">
<title>Database backend</title>
<para>
Log entries can be inserted into a database when Kea is configured
with database backend support: a table named 'logs' is used with a
timestamp (timeuuid for Cassandra CQL) generated by the database
software and a text log with the same format than for files
without the timestamp.
</para>
<para>
Please refer to <xref linkend="mysql-database"/> for MySQL,
to <xref linkend="pgsql-database"/> for PostgreSQL or
to <xref linkend="cql-database"/> for Cassandra CQL.
Scripts are in
<filename><replaceable>path-to-kea</replaceable>/share/kea/legal_log/scripts</filename> directory, for instance the PostgreSQL create schema
command is:
<screen>
$ <userinput>psql -d <replaceable>database-name</replaceable> -U <replaceable>user-name</replaceable> -f <replaceable>path-to-kea</replaceable>/share/kea/legal_log/scripts/pgsql/legldb_create.pgsql</userinput>
Password for user <replaceable>user-name</replaceable>:
START TRANSACTION
CREATE TABLE
CREATE INDEX
CREATE TABLE
INSERT 0 1
COMMIT
$
</screen>
</para>
<para>
Configuration parameters are extended by standard lease database
parameters as defined in <xref linkend="database-configuration4"/>.
The "type" parameter should be "mysql", "postgresql", "cql" or
be "logfile". When it is absent or set to "logfile" files are
used.
</para>
<para>
This database feature is experimental and will be likely
improved, for instance to add an address / prefix index (currently
the only index is the timestamp). No specific tools is provided
to operate the database but standard tools are applicable,
for instance to dump the logs table from a CQL database:
<screen>
$ <userinput>echo 'SELECT dateOf(timeuuid), log FROM logs;' | cqlsh -k <replaceable>database-name</replaceable></userinput>
system.dateof(timeuuid) | log
---------------------------------+---------------------------------------
2018-01-06 01:02:03.227000+0000 | Address: 192.2.1.100 has been renewed ...
...
(12 rows)
$
</screen>
</para>
</section>
</section>
<section xml:id="flex-id">
......
......@@ -114,8 +114,10 @@ libkea_dhcpsrv_la_SOURCES += d2_client_mgr.cc d2_client_mgr.h
libkea_dhcpsrv_la_SOURCES += daemon.cc daemon.h
libkea_dhcpsrv_la_SOURCES += database_connection.cc database_connection.h
libkea_dhcpsrv_la_SOURCES += db_exceptions.h
libkea_dhcpsrv_la_SOURCES += db_log.cc db_log.h
libkea_dhcpsrv_la_SOURCES += dhcp4o6_ipc.cc dhcp4o6_ipc.h
libkea_dhcpsrv_la_SOURCES += dhcpsrv_log.cc dhcpsrv_log.h
libkea_dhcpsrv_la_SOURCES += dhcpsrv_db_log.cc dhcpsrv_db_log.h
libkea_dhcpsrv_la_SOURCES += host.cc host.h
libkea_dhcpsrv_la_SOURCES += host_container.h
libkea_dhcpsrv_la_SOURCES += host_data_source_factory.cc host_data_source_factory.h
......
// Copyright (C) 2015-2017 Deutsche Telekom AG.
// Copyright (C) 2015-2018 Deutsche Telekom AG.
//
// Authors: Razvan Becheriu <razvan.becheriu@qualitance.com>
// Andrei Pavel <andrei.pavel@qualitance.com>
......@@ -20,7 +20,7 @@
#include <dhcpsrv/cql_connection.h>
#include <dhcpsrv/cql_exchange.h>
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/dhcpsrv_log.h>
#include <dhcpsrv/db_log.h>
#include <string>
......@@ -69,7 +69,7 @@ CqlConnection::~CqlConnection() {
if (rc != CASS_OK) {
// We're closing the connection anyway. Let's not throw at this stage.
LOG_ERROR(dhcpsrv_logger, DHCPSRV_CQL_DEALLOC_ERROR).arg(error);
DB_LOG_ERROR(CQL_DEALLOC_ERROR).arg(error);
}
}
......@@ -349,20 +349,17 @@ CqlConnection::setConsistency(bool force, CassConsistency consistency) {
void
CqlConnection::startTransaction() {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
DHCPSRV_CQL_CONNECTION_BEGIN_TRANSACTION);
DB_LOG_DEBUG(DB_DBG_TRACE_DETAIL, CQL_CONNECTION_BEGIN_TRANSACTION);
}
void
CqlConnection::commit() {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
DHCPSRV_CQL_CONNECTION_COMMIT);
DB_LOG_DEBUG(DB_DBG_TRACE_DETAIL, CQL_CONNECTION_COMMIT);
}
void
CqlConnection::rollback() {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
DHCPSRV_CQL_CONNECTION_ROLLBACK);
DB_LOG_DEBUG(DB_DBG_TRACE_DETAIL, CQL_CONNECTION_ROLLBACK);
}
const std::string
......
// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -8,7 +8,7 @@
#include <dhcpsrv/database_connection.h>
#include <dhcpsrv/db_exceptions.h>
#include <dhcpsrv/dhcpsrv_log.h>
#include <dhcpsrv/db_log.h>
#include <exceptions/exceptions.h>
#include <boost/algorithm/string.hpp>
......@@ -50,7 +50,7 @@ DatabaseConnection::parse(const std::string& dbaccess) {
string value = token.substr(pos + 1);
mapped_tokens.insert(make_pair(name, value));
} else {
LOG_ERROR(dhcpsrv_logger, DHCPSRV_INVALID_ACCESS).arg(dbaccess);
DB_LOG_ERROR(DB_INVALID_ACCESS).arg(dbaccess);
isc_throw(InvalidParameter, "Cannot parse " << token
<< ", expected format is name=value");
}
......
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// Defines the logger used by the NSAS
#include <exceptions/exceptions.h>
#include <dhcpsrv/db_log.h>
#include <dhcpsrv/dhcpsrv_db_log.h>
using namespace isc::log;
namespace isc {
namespace dhcp {
const MessageID&
DbLogger::translateMessage(const DbMessageID& id) const {
try {
return (map_.at(id));
} catch (const std::out_of_range&) {
isc_throw(isc::Unexpected, "can't map message: " << id);
}
}
void checkDbLoggerStack() {
if (db_logger_stack.empty()) {
isc_throw(isc::Unexpected, "database logger stack is empty");
}
}
} // namespace dhcp
} // namespace isc
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef DB_LOG_H
#define DB_LOG_H
#include <log/macros.h>
#include <map>
#include <list>
/// @file db_log.h
///
/// We want to reuse the database backend connection and exchange code
/// for other uses, in particular for hook libraries. But this code
/// includes some calls to the system logger for debug and uncommon
/// cases and of course we do not want to get log messages from
/// a hook library to seem to come from DHCP server core.
///
/// The solution is to use a database logger which calls the right
/// logger with mapped messages.
namespace isc {
namespace dhcp {
///@{
/// @brief Database logging levels
///
/// Defines the levels used to output debug messages in the database
/// support. Note that higher numbers equate to more verbose (and detailed)
/// output.
/// @brief Additional information
///
/// Record detailed tracing. This is generally reserved for tracing access to
/// the lease database.
const int DB_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
///@}
///@{
/// @brief Database messages
///
enum DbMessageID {
DB_INVALID_ACCESS,
PGSQL_DEALLOC_ERROR,
PGSQL_FATAL_ERROR,
PGSQL_START_TRANSACTION,
PGSQL_COMMIT,
PGSQL_ROLLBACK,
MYSQL_FATAL_ERROR,
MYSQL_START_TRANSACTION,
MYSQL_COMMIT,
MYSQL_ROLLBACK,
CQL_DEALLOC_ERROR,
CQL_CONNECTION_BEGIN_TRANSACTION,
CQL_CONNECTION_COMMIT,
CQL_CONNECTION_ROLLBACK
};
///@}
/// @brief Database logger class
///
class DbLogger {
public:
/// @brief Translation map type
typedef std::map<DbMessageID, isc::log::MessageID> MessageMap;
/// @brief Constructor
///
/// @param logger logger which will be called
/// @param map message id translation map
DbLogger(isc::log::Logger& logger, const MessageMap& map)
: logger_(logger), map_(map) {
}
/// @brief Translate message
///
/// @param id database message id
/// @return logger message
/// @throw Unexpected if the id is not in the message map
const isc::log::MessageID& translateMessage(const DbMessageID& id) const;
/// @brief The logger
isc::log::Logger& logger_;
/// @brief The translation map
const MessageMap& map_;
};
/// @brief Database logger stack
typedef std::list<DbLogger> DbLoggerStack;
/// @brief Global database logger stack (initialized to dhcpsrv logger)
extern DbLoggerStack db_logger_stack;
/// @brief Check database logger stack
///
/// @throw Unexpected if the stack is empty
void checkDbLoggerStack();
///@{
/// @brief Macros
#define DB_LOG_DEBUG(LEVEL, MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isDebugEnabled((LEVEL))) { \
} else \
db_logger_stack.back().logger_.debug((LEVEL), \
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_INFO(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isInfoEnabled()) { \
} else \
db_logger_stack.back().logger_.info( \
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_WARN(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isWarnEnabled()) { \
} else \
db_logger_stack.back().logger_.warn( \
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_ERROR(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isErrorEnabled()) { \
} else \
db_logger_stack.back().logger_.error( \
db_logger_stack.back().translateMessage((MESSAGE)))
#define DB_LOG_FATAL(MESSAGE) \
checkDbLoggerStack(); \
if (!db_logger_stack.back().logger_.isFatalEnabled()) { \
} else \
db_logger_stack.back().logger_.fatal( \
db_logger_stack.back().translateMessage((MESSAGE)))
///@}
} // namespace dhcp
} // namespace isc
#endif // DB_LOG_H
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
/// Defines the logger used by the NSAS
#include <dhcpsrv/dhcpsrv_db_log.h>
#include <dhcpsrv/dhcpsrv_log.h>
namespace isc {
namespace dhcp {
const DbLogger::MessageMap dhcpsrv_db_message_map = {
{ DB_INVALID_ACCESS, DHCPSRV_INVALID_ACCESS },
{ PGSQL_DEALLOC_ERROR, DHCPSRV_PGSQL_DEALLOC_ERROR },
{ PGSQL_FATAL_ERROR, DHCPSRV_PGSQL_FATAL_ERROR },
{ PGSQL_START_TRANSACTION, DHCPSRV_PGSQL_START_TRANSACTION },
{ PGSQL_COMMIT, DHCPSRV_PGSQL_COMMIT },
{ PGSQL_ROLLBACK, DHCPSRV_PGSQL_ROLLBACK },
{ MYSQL_FATAL_ERROR, DHCPSRV_MYSQL_FATAL_ERROR },
{ MYSQL_START_TRANSACTION, DHCPSRV_MYSQL_START_TRANSACTION },
{ MYSQL_COMMIT, DHCPSRV_MYSQL_COMMIT },
{ MYSQL_ROLLBACK, DHCPSRV_MYSQL_ROLLBACK },
{ CQL_DEALLOC_ERROR, DHCPSRV_CQL_DEALLOC_ERROR },
{ CQL_CONNECTION_BEGIN_TRANSACTION,
DHCPSRV_CQL_CONNECTION_BEGIN_TRANSACTION },
{ CQL_CONNECTION_COMMIT, DHCPSRV_CQL_CONNECTION_COMMIT },
{ CQL_CONNECTION_ROLLBACK, DHCPSRV_CQL_CONNECTION_ROLLBACK }
};
DbLogger dhcpsrv_db_logger(dhcpsrv_logger, dhcpsrv_db_message_map);
// Do this initialization here!
DbLoggerStack db_logger_stack = { dhcpsrv_db_logger };
} // namespace dhcp
} // namespace isc
// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef DHCPSRV_DB_LOG_H
#define DHCPSRV_DB_LOG_H
#include <dhcpsrv/db_log.h>
namespace isc {
namespace dhcp {
/// @brief DHCP server database message map
extern const DbLogger::MessageMap dhcpsrv_db_message_map;
/// @brief DHCP server database Logger
///
/// It is the default database logger.
extern DbLogger dhcpsrv_db_logger;
} // namespace dhcp
} // namespace isc
#endif // DHCPSRV_DB_LOG_H
// Copyright (C) 2012-2017 Internet Systems Consortium, Inc. ("ISC")