23#include <boost/lexical_cast.hpp>
54 if (family == AF_INET) {
55 if (proc_name !=
"kea-dhcp4") {
57 <<
", expected kea-dhcp4");
60 if (proc_name !=
"kea-dhcp6") {
62 <<
", expected kea-dhcp6");
83 .arg(redacted).arg(err.
what());
86 }
catch (
const std::exception& ex) {
111 }
catch (
const std::exception& ex) {
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
A generic exception that is thrown when an unexpected error condition occurs.
static std::string redactedAccessString(const ParameterMap ¶meters)
Redact database access string.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
Exception thrown on failure to open database but permit retries.
uint16_t getFamily() const
Returns address family.
static CfgMgr & instance()
returns a single instance of Configuration Manager
static bool unregisterBackendFactory(const std::string &db_type, bool no_log=false)
Unregisters the backend factory function for a given backend type.
static void addBackend(db::DatabaseConnection::ParameterMap ¶meters, ManagerID id=0)
Create an instance of a forensic log backend.
static void delAllBackends()
Removes all backends from the pool.
static bool registerBackendFactory(const std::string &db_type, const Factory &factory, bool no_log=false, DBVersion db_version=DBVersion())
Registers new backend factory function for a given backend type.
static void parseConfig(const isc::data::ConstElementPtr ¶meters, isc::db::DatabaseConnection::ParameterMap &map)
Parse database specification.
int getLibraryIndex() const
Get library index.
isc::data::ConstElementPtr getParameters()
Get configuration parameter common code.
static isc::dhcp::LegalLogMgrPtr factory(const isc::db::DatabaseConnection::ParameterMap ¶meters)
Factory class method.
static isc::dhcp::LegalLogMgrPtr factory(const isc::db::DatabaseConnection::ParameterMap ¶meters)
Factory class method.
static std::string getProcName()
returns the process name This value is used as when forming the default PID file name
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
int multi_threading_compatible()
This function is called to retrieve the multi-threading compatibility.
int unload()
Called by the Hooks library manager when the library is unloaded.
int load(LibraryHandle &handle)
Called by the Hooks library manager when the library is loaded.
const isc::log::MessageID LEGAL_LOG_UNLOAD_ERROR
const isc::log::MessageID LEGAL_LOG_LOAD_ERROR
const isc::log::MessageID LEGAL_LOG_DB_OPEN_CONNECTION_WITH_RETRY_FAILED
Defines the abstract class for backend stores.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
boost::shared_ptr< const Element > ConstElementPtr
isc::log::Logger legal_log_logger("legal-log-hooks")
Legal Log Logger.
Defines the logger used by the top-level component of kea-lfc.
Defines the class, RotatingFile, which implements an appending text file that rotates to a new file o...