mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[#3536] use only one loger on load and unload
This commit is contained in:
parent
6dbb732fad
commit
30dea22baf
@ -62,21 +62,19 @@ int load(LibraryHandle& /* handle */) {
|
||||
// Register MySQL CB factories with CB Managers
|
||||
MySqlConfigBackendDHCPv4::registerBackendType();
|
||||
MySqlConfigBackendDHCPv6::registerBackendType();
|
||||
LOG_INFO(mysql_cb_logger, MYSQL_CB_INIT_OK);
|
||||
|
||||
// Register MySQL HB factories with Host Managers
|
||||
HostDataSourceFactory::registerFactory("mysql",
|
||||
MySqlHostDataSource::factory,
|
||||
true,
|
||||
MySqlHostDataSource::getDBVersion);
|
||||
LOG_INFO(mysql_hb_logger, MYSQL_HB_INIT_OK);
|
||||
|
||||
// Register MySQL LB factories with Lease Managers
|
||||
LeaseMgrFactory::registerFactory("mysql",
|
||||
MySqlLeaseMgr::factory,
|
||||
true,
|
||||
MySqlLeaseMgr::getDBVersion);
|
||||
LOG_INFO(mysql_lb_logger, MYSQL_LB_INIT_OK);
|
||||
LOG_INFO(mysql_lb_logger, MYSQL_INIT_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -117,15 +115,13 @@ int unload() {
|
||||
io_service->stopAndPoll();
|
||||
MySqlConfigBackendImpl::setIOService(IOServicePtr());
|
||||
}
|
||||
LOG_INFO(mysql_cb_logger, MYSQL_CB_DEINIT_OK);
|
||||
|
||||
// Unregister the factories and remove MySQL backends
|
||||
HostDataSourceFactory::deregisterFactory("mysql", true);
|
||||
LOG_INFO(mysql_hb_logger, MYSQL_HB_DEINIT_OK);
|
||||
|
||||
// Unregister the factories and remove MySQL backends
|
||||
LeaseMgrFactory::deregisterFactory("mysql", true);
|
||||
LOG_INFO(mysql_lb_logger, MYSQL_LB_DEINIT_OK);
|
||||
LOG_INFO(mysql_lb_logger, MYSQL_DEINIT_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION4 =
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6 = "MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6";
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SUBNET4 = "MYSQL_CB_CREATE_UPDATE_SUBNET4";
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SUBNET6 = "MYSQL_CB_CREATE_UPDATE_SUBNET6";
|
||||
extern const isc::log::MessageID MYSQL_CB_DEINIT_OK = "MYSQL_CB_DEINIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4 = "MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4";
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT = "MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT";
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES6 = "MYSQL_CB_DELETE_ALL_CLIENT_CLASSES6";
|
||||
@ -185,7 +184,6 @@ extern const isc::log::MessageID MYSQL_CB_GET_SUBNET6_BY_PREFIX = "MYSQL_CB_GET_
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_SUBNET6_BY_SUBNET_ID = "MYSQL_CB_GET_SUBNET6_BY_SUBNET_ID";
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_TYPE4 = "MYSQL_CB_GET_TYPE4";
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_TYPE6 = "MYSQL_CB_GET_TYPE6";
|
||||
extern const isc::log::MessageID MYSQL_CB_INIT_OK = "MYSQL_CB_INIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_CB_NO_TLS = "MYSQL_CB_NO_TLS";
|
||||
extern const isc::log::MessageID MYSQL_CB_RECONNECT_ATTEMPT_FAILED4 = "MYSQL_CB_RECONNECT_ATTEMPT_FAILED4";
|
||||
extern const isc::log::MessageID MYSQL_CB_RECONNECT_ATTEMPT_FAILED6 = "MYSQL_CB_RECONNECT_ATTEMPT_FAILED6";
|
||||
@ -226,7 +224,6 @@ const char* values[] = {
|
||||
"MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6", "create or update shared network: %1 option",
|
||||
"MYSQL_CB_CREATE_UPDATE_SUBNET4", "create or update subnet: %1",
|
||||
"MYSQL_CB_CREATE_UPDATE_SUBNET6", "create or update subnet: %1",
|
||||
"MYSQL_CB_DEINIT_OK", "unloading MySQL CB hooks library successful",
|
||||
"MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4", "delete all client classes",
|
||||
"MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT", "deleted: %1 entries",
|
||||
"MYSQL_CB_DELETE_ALL_CLIENT_CLASSES6", "delete all client classes",
|
||||
@ -383,7 +380,6 @@ const char* values[] = {
|
||||
"MYSQL_CB_GET_SUBNET6_BY_SUBNET_ID", "retrieving subnet by subnet id: %1",
|
||||
"MYSQL_CB_GET_TYPE4", "get type",
|
||||
"MYSQL_CB_GET_TYPE6", "get type",
|
||||
"MYSQL_CB_INIT_OK", "loading MySQL CB hooks library successful",
|
||||
"MYSQL_CB_NO_TLS", "TLS was required but is not used",
|
||||
"MYSQL_CB_RECONNECT_ATTEMPT_FAILED4", "database reconnect failed: %1",
|
||||
"MYSQL_CB_RECONNECT_ATTEMPT_FAILED6", "database reconnect failed: %1",
|
||||
|
@ -29,7 +29,6 @@ extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION4;
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6;
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SUBNET4;
|
||||
extern const isc::log::MessageID MYSQL_CB_CREATE_UPDATE_SUBNET6;
|
||||
extern const isc::log::MessageID MYSQL_CB_DEINIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4;
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT;
|
||||
extern const isc::log::MessageID MYSQL_CB_DELETE_ALL_CLIENT_CLASSES6;
|
||||
@ -186,7 +185,6 @@ extern const isc::log::MessageID MYSQL_CB_GET_SUBNET6_BY_PREFIX;
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_SUBNET6_BY_SUBNET_ID;
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_TYPE4;
|
||||
extern const isc::log::MessageID MYSQL_CB_GET_TYPE6;
|
||||
extern const isc::log::MessageID MYSQL_CB_INIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_CB_NO_TLS;
|
||||
extern const isc::log::MessageID MYSQL_CB_RECONNECT_ATTEMPT_FAILED4;
|
||||
extern const isc::log::MessageID MYSQL_CB_RECONNECT_ATTEMPT_FAILED6;
|
||||
|
@ -88,10 +88,6 @@ Debug message issued when triggered an action to create or update subnet
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to create or update subnet
|
||||
|
||||
% MYSQL_CB_DEINIT_OK unloading MySQL CB hooks library successful
|
||||
This informational message indicates that the MySQL Configuration Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% MYSQL_CB_DELETE_ALL_CLIENT_CLASSES4 delete all client classes
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to delete all client classes
|
||||
@ -720,10 +716,6 @@ Debug message issued when triggered an action to retrieve type
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to retrieve type
|
||||
|
||||
% MYSQL_CB_INIT_OK loading MySQL CB hooks library successful
|
||||
This informational message indicates that the MySQL Configuration Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% MYSQL_CB_NO_TLS TLS was required but is not used
|
||||
This error message is issued when TLS for the connection was required but
|
||||
TLS is not used.
|
||||
|
@ -13,8 +13,6 @@ extern const isc::log::MessageID MYSQL_HB_DB_READONLY = "MYSQL_HB_DB_READONLY";
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_ATTEMPT_FAILED = "MYSQL_HB_DB_RECONNECT_ATTEMPT_FAILED";
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE = "MYSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE";
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_FAILED = "MYSQL_HB_DB_RECONNECT_FAILED";
|
||||
extern const isc::log::MessageID MYSQL_HB_DEINIT_OK = "MYSQL_HB_DEINIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_HB_INIT_OK = "MYSQL_HB_INIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_HB_NO_TLS = "MYSQL_HB_NO_TLS";
|
||||
extern const isc::log::MessageID MYSQL_HB_TLS_CIPHER = "MYSQL_HB_TLS_CIPHER";
|
||||
|
||||
@ -30,8 +28,6 @@ const char* values[] = {
|
||||
"MYSQL_HB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
||||
"MYSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||
"MYSQL_HB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||
"MYSQL_HB_DEINIT_OK", "unloading MySQL HB hooks library successful",
|
||||
"MYSQL_HB_INIT_OK", "loading MySQL HB hooks library successful",
|
||||
"MYSQL_HB_NO_TLS", "TLS was required but is not used",
|
||||
"MYSQL_HB_TLS_CIPHER", "TLS cipher: %1",
|
||||
NULL
|
||||
|
@ -14,8 +14,6 @@ extern const isc::log::MessageID MYSQL_HB_DB_READONLY;
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_ATTEMPT_FAILED;
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE;
|
||||
extern const isc::log::MessageID MYSQL_HB_DB_RECONNECT_FAILED;
|
||||
extern const isc::log::MessageID MYSQL_HB_DEINIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_HB_INIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_HB_NO_TLS;
|
||||
extern const isc::log::MessageID MYSQL_HB_TLS_CIPHER;
|
||||
|
||||
|
@ -12,14 +12,6 @@ V6) is about to open a MySQL hosts database. The parameters of the
|
||||
connection including database name and username needed to access it
|
||||
(but not the password if any) are logged.
|
||||
|
||||
% MYSQL_HB_DEINIT_OK unloading MySQL HB hooks library successful
|
||||
This informational message indicates that the MySQL Host Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% MYSQL_HB_INIT_OK loading MySQL HB hooks library successful
|
||||
This informational message indicates that the MySQL Host Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% MYSQL_HB_DB_GET_VERSION obtaining schema version information for the MySQL hosts database
|
||||
Logged at debug log level 50.
|
||||
A debug message issued when the server is about to obtain schema version
|
||||
|
@ -7,6 +7,8 @@
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
|
||||
extern const isc::log::MessageID MYSQL_DEINIT_OK = "MYSQL_DEINIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_INIT_OK = "MYSQL_INIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_LB_ADD_ADDR4 = "MYSQL_LB_ADD_ADDR4";
|
||||
extern const isc::log::MessageID MYSQL_LB_ADD_ADDR6 = "MYSQL_LB_ADD_ADDR6";
|
||||
extern const isc::log::MessageID MYSQL_LB_COMMIT = "MYSQL_LB_COMMIT";
|
||||
@ -14,7 +16,6 @@ extern const isc::log::MessageID MYSQL_LB_DB = "MYSQL_LB_DB";
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_ATTEMPT_FAILED = "MYSQL_LB_DB_RECONNECT_ATTEMPT_FAILED";
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE = "MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE";
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_FAILED = "MYSQL_LB_DB_RECONNECT_FAILED";
|
||||
extern const isc::log::MessageID MYSQL_LB_DEINIT_OK = "MYSQL_LB_DEINIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETED_EXPIRED_RECLAIMED = "MYSQL_LB_DELETED_EXPIRED_RECLAIMED";
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETE_ADDR4 = "MYSQL_LB_DELETE_ADDR4";
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETE_ADDR6 = "MYSQL_LB_DELETE_ADDR6";
|
||||
@ -45,7 +46,6 @@ extern const isc::log::MessageID MYSQL_LB_GET_SUBID_CLIENTID = "MYSQL_LB_GET_SUB
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_SUBID_HWADDR = "MYSQL_LB_GET_SUBID_HWADDR";
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_SUBID_PAGE6 = "MYSQL_LB_GET_SUBID_PAGE6";
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_VERSION = "MYSQL_LB_GET_VERSION";
|
||||
extern const isc::log::MessageID MYSQL_LB_INIT_OK = "MYSQL_LB_INIT_OK";
|
||||
extern const isc::log::MessageID MYSQL_LB_NEGATIVE_LEASES_STAT = "MYSQL_LB_NEGATIVE_LEASES_STAT";
|
||||
extern const isc::log::MessageID MYSQL_LB_NO_TLS = "MYSQL_LB_NO_TLS";
|
||||
extern const isc::log::MessageID MYSQL_LB_ROLLBACK = "MYSQL_LB_ROLLBACK";
|
||||
@ -65,6 +65,8 @@ extern const isc::log::MessageID MYSQL_LB_UPGRADE_EXTENDED_INFO6_PAGE = "MYSQL_L
|
||||
namespace {
|
||||
|
||||
const char* values[] = {
|
||||
"MYSQL_DEINIT_OK", "unloading MySQL hooks library successful",
|
||||
"MYSQL_INIT_OK", "loading MySQL hooks library successful",
|
||||
"MYSQL_LB_ADD_ADDR4", "adding IPv4 lease with address %1",
|
||||
"MYSQL_LB_ADD_ADDR6", "adding IPv6 lease with address %1, lease type %2",
|
||||
"MYSQL_LB_COMMIT", "committing to MySQL database",
|
||||
@ -72,7 +74,6 @@ const char* values[] = {
|
||||
"MYSQL_LB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
||||
"MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||
"MYSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||
"MYSQL_LB_DEINIT_OK", "unloading MySQL LB hooks library successful",
|
||||
"MYSQL_LB_DELETED_EXPIRED_RECLAIMED", "deleted %1 reclaimed leases from the database",
|
||||
"MYSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
||||
"MYSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
||||
@ -103,7 +104,6 @@ const char* values[] = {
|
||||
"MYSQL_LB_GET_SUBID_HWADDR", "obtaining IPv4 lease for subnet ID %1 and hardware address %2",
|
||||
"MYSQL_LB_GET_SUBID_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2 for subnet ID %3",
|
||||
"MYSQL_LB_GET_VERSION", "obtaining schema version information",
|
||||
"MYSQL_LB_INIT_OK", "loading MySQL LB hooks library successful",
|
||||
"MYSQL_LB_NEGATIVE_LEASES_STAT", "recount of leases returned a negative value",
|
||||
"MYSQL_LB_NO_TLS", "TLS was required but is not used",
|
||||
"MYSQL_LB_ROLLBACK", "rolling back MySQL database",
|
||||
|
@ -8,6 +8,8 @@
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
|
||||
extern const isc::log::MessageID MYSQL_DEINIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_INIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_LB_ADD_ADDR4;
|
||||
extern const isc::log::MessageID MYSQL_LB_ADD_ADDR6;
|
||||
extern const isc::log::MessageID MYSQL_LB_COMMIT;
|
||||
@ -15,7 +17,6 @@ extern const isc::log::MessageID MYSQL_LB_DB;
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_ATTEMPT_FAILED;
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE;
|
||||
extern const isc::log::MessageID MYSQL_LB_DB_RECONNECT_FAILED;
|
||||
extern const isc::log::MessageID MYSQL_LB_DEINIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETED_EXPIRED_RECLAIMED;
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETE_ADDR4;
|
||||
extern const isc::log::MessageID MYSQL_LB_DELETE_ADDR6;
|
||||
@ -46,7 +47,6 @@ extern const isc::log::MessageID MYSQL_LB_GET_SUBID_CLIENTID;
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_SUBID_HWADDR;
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_SUBID_PAGE6;
|
||||
extern const isc::log::MessageID MYSQL_LB_GET_VERSION;
|
||||
extern const isc::log::MessageID MYSQL_LB_INIT_OK;
|
||||
extern const isc::log::MessageID MYSQL_LB_NEGATIVE_LEASES_STAT;
|
||||
extern const isc::log::MessageID MYSQL_LB_NO_TLS;
|
||||
extern const isc::log::MessageID MYSQL_LB_ROLLBACK;
|
||||
|
@ -12,12 +12,12 @@ V6) is about to open a MySQL lease database. The parameters of the
|
||||
connection including database name and username needed to access it
|
||||
(but not the password if any) are logged.
|
||||
|
||||
% MYSQL_LB_DEINIT_OK unloading MySQL LB hooks library successful
|
||||
This informational message indicates that the MySQL Lease Backend hooks
|
||||
% MYSQL_DEINIT_OK unloading MySQL hooks library successful
|
||||
This informational message indicates that the MySQL Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% MYSQL_LB_INIT_OK loading MySQL LB hooks library successful
|
||||
This informational message indicates that the MySQL Lease Backend hooks
|
||||
% MYSQL_INIT_OK loading MySQL hooks library successful
|
||||
This informational message indicates that the MySQL Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% MYSQL_LB_ADD_ADDR4 adding IPv4 lease with address %1
|
||||
|
@ -62,21 +62,19 @@ int load(LibraryHandle& /* handle */) {
|
||||
// Register PostgreSQL CB factories with CB Managers
|
||||
PgSqlConfigBackendDHCPv4::registerBackendType();
|
||||
PgSqlConfigBackendDHCPv6::registerBackendType();
|
||||
LOG_INFO(pgsql_cb_logger, PGSQL_CB_INIT_OK);
|
||||
|
||||
// Register PostgreSQL HB factories with Host Managers
|
||||
HostDataSourceFactory::registerFactory("postgresql",
|
||||
PgSqlHostDataSource::factory,
|
||||
true,
|
||||
PgSqlHostDataSource::getDBVersion);
|
||||
LOG_INFO(pgsql_hb_logger, PGSQL_HB_INIT_OK);
|
||||
|
||||
// Register PostgreSQL LB factories with Lease Managers
|
||||
LeaseMgrFactory::registerFactory("postgresql",
|
||||
PgSqlLeaseMgr::factory,
|
||||
true,
|
||||
PgSqlLeaseMgr::getDBVersion);
|
||||
LOG_INFO(pgsql_lb_logger, PGSQL_LB_INIT_OK);
|
||||
LOG_INFO(pgsql_lb_logger, PGSQL_INIT_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -117,15 +115,13 @@ int unload() {
|
||||
io_service->stopAndPoll();
|
||||
PgSqlConfigBackendImpl::setIOService(IOServicePtr());
|
||||
}
|
||||
LOG_INFO(pgsql_cb_logger, PGSQL_CB_DEINIT_OK);
|
||||
|
||||
// Unregister the factories and remove PostgreSQL backends
|
||||
HostDataSourceFactory::deregisterFactory("postgresql", true);
|
||||
LOG_INFO(pgsql_hb_logger, PGSQL_HB_DEINIT_OK);
|
||||
|
||||
// Unregister the factories and remove PostgreSQL backends
|
||||
LeaseMgrFactory::deregisterFactory("postgresql", true);
|
||||
LOG_INFO(pgsql_lb_logger, PGSQL_LB_DEINIT_OK);
|
||||
LOG_INFO(pgsql_lb_logger, PGSQL_DEINIT_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION4 =
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6 = "PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6";
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SUBNET4 = "PGSQL_CB_CREATE_UPDATE_SUBNET4";
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SUBNET6 = "PGSQL_CB_CREATE_UPDATE_SUBNET6";
|
||||
extern const isc::log::MessageID PGSQL_CB_DEINIT_OK = "PGSQL_CB_DEINIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4 = "PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4";
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT = "PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT";
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES6 = "PGSQL_CB_DELETE_ALL_CLIENT_CLASSES6";
|
||||
@ -185,7 +184,6 @@ extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_PREFIX = "PGSQL_CB_GET_
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID = "PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID";
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_TYPE4 = "PGSQL_CB_GET_TYPE4";
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_TYPE6 = "PGSQL_CB_GET_TYPE6";
|
||||
extern const isc::log::MessageID PGSQL_CB_INIT_OK = "PGSQL_CB_INIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_CB_NO_TLS_SUPPORT = "PGSQL_CB_NO_TLS_SUPPORT";
|
||||
extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED4 = "PGSQL_CB_RECONNECT_ATTEMPT_FAILED4";
|
||||
extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED6 = "PGSQL_CB_RECONNECT_ATTEMPT_FAILED6";
|
||||
@ -226,7 +224,6 @@ const char* values[] = {
|
||||
"PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6", "create or update shared network: %1 option",
|
||||
"PGSQL_CB_CREATE_UPDATE_SUBNET4", "create or update subnet: %1",
|
||||
"PGSQL_CB_CREATE_UPDATE_SUBNET6", "create or update subnet: %1",
|
||||
"PGSQL_CB_DEINIT_OK", "unloading PostgreSQL CB hooks library successful",
|
||||
"PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4", "delete all client classes",
|
||||
"PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT", "deleted: %1 entries",
|
||||
"PGSQL_CB_DELETE_ALL_CLIENT_CLASSES6", "delete all client classes",
|
||||
@ -383,7 +380,6 @@ const char* values[] = {
|
||||
"PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID", "retrieving subnet by subnet id: %1",
|
||||
"PGSQL_CB_GET_TYPE4", "get type",
|
||||
"PGSQL_CB_GET_TYPE6", "get type",
|
||||
"PGSQL_CB_INIT_OK", "loading PostgreSQL CB hooks library successful",
|
||||
"PGSQL_CB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
|
||||
"PGSQL_CB_RECONNECT_ATTEMPT_FAILED4", "database reconnect failed: %1",
|
||||
"PGSQL_CB_RECONNECT_ATTEMPT_FAILED6", "database reconnect failed: %1",
|
||||
|
@ -29,7 +29,6 @@ extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION4;
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SHARED_NETWORK_OPTION6;
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SUBNET4;
|
||||
extern const isc::log::MessageID PGSQL_CB_CREATE_UPDATE_SUBNET6;
|
||||
extern const isc::log::MessageID PGSQL_CB_DEINIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4;
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4_RESULT;
|
||||
extern const isc::log::MessageID PGSQL_CB_DELETE_ALL_CLIENT_CLASSES6;
|
||||
@ -186,7 +185,6 @@ extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_PREFIX;
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_SUBNET6_BY_SUBNET_ID;
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_TYPE4;
|
||||
extern const isc::log::MessageID PGSQL_CB_GET_TYPE6;
|
||||
extern const isc::log::MessageID PGSQL_CB_INIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_CB_NO_TLS_SUPPORT;
|
||||
extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED4;
|
||||
extern const isc::log::MessageID PGSQL_CB_RECONNECT_ATTEMPT_FAILED6;
|
||||
|
@ -88,10 +88,6 @@ Debug message issued when triggered an action to create or update subnet
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to create or update subnet
|
||||
|
||||
% PGSQL_CB_DEINIT_OK unloading PostgreSQL CB hooks library successful
|
||||
This informational message indicates that the PostgreSQL Configuration Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% PGSQL_CB_DELETE_ALL_CLIENT_CLASSES4 delete all client classes
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to delete all client classes
|
||||
@ -720,10 +716,6 @@ Debug message issued when triggered an action to retrieve type
|
||||
Logged at debug log level 40.
|
||||
Debug message issued when triggered an action to retrieve type
|
||||
|
||||
% PGSQL_CB_INIT_OK loading PostgreSQL CB hooks library successful
|
||||
This informational message indicates that the PostgreSQL Configuration Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% PGSQL_CB_NO_TLS_SUPPORT Attempt to configure TLS (unsupported for PostgreSQL): %1
|
||||
This error message is printed when TLS support was required in the Kea
|
||||
configuration: Kea was built with this feature disabled for PostgreSQL.
|
||||
|
@ -13,8 +13,6 @@ extern const isc::log::MessageID PGSQL_HB_DB_READONLY = "PGSQL_HB_DB_READONLY";
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED = "PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED";
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE = "PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE";
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_FAILED = "PGSQL_HB_DB_RECONNECT_FAILED";
|
||||
extern const isc::log::MessageID PGSQL_HB_DEINIT_OK = "PGSQL_HB_DEINIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_HB_INIT_OK = "PGSQL_HB_INIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_HB_NO_TLS_SUPPORT = "PGSQL_HB_NO_TLS_SUPPORT";
|
||||
extern const isc::log::MessageID PGSQL_HB_TLS_SUPPORT = "PGSQL_HB_TLS_SUPPORT";
|
||||
|
||||
@ -30,8 +28,6 @@ const char* values[] = {
|
||||
"PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
||||
"PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||
"PGSQL_HB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||
"PGSQL_HB_DEINIT_OK", "unloading PostgreSQL HB hooks library successful",
|
||||
"PGSQL_HB_INIT_OK", "loading PostgreSQL HB hooks library successful",
|
||||
"PGSQL_HB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
|
||||
"PGSQL_HB_TLS_SUPPORT", "Attempt to configure TLS: %1",
|
||||
NULL
|
||||
|
@ -14,8 +14,6 @@ extern const isc::log::MessageID PGSQL_HB_DB_READONLY;
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_FAILED;
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_ATTEMPT_SCHEDULE;
|
||||
extern const isc::log::MessageID PGSQL_HB_DB_RECONNECT_FAILED;
|
||||
extern const isc::log::MessageID PGSQL_HB_DEINIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_HB_INIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_HB_NO_TLS_SUPPORT;
|
||||
extern const isc::log::MessageID PGSQL_HB_TLS_SUPPORT;
|
||||
|
||||
|
@ -12,14 +12,6 @@ V6) is about to open a PostgreSQL hosts database. The parameters of the
|
||||
connection including database name and username needed to access it
|
||||
(but not the password if any) are logged.
|
||||
|
||||
% PGSQL_HB_DEINIT_OK unloading PostgreSQL HB hooks library successful
|
||||
This informational message indicates that the PostgreSQL Host Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% PGSQL_HB_INIT_OK loading PostgreSQL HB hooks library successful
|
||||
This informational message indicates that the PostgreSQL Host Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% PGSQL_HB_DB_GET_VERSION obtaining schema version information for the PostgreSQL hosts database
|
||||
Logged at debug log level 50.
|
||||
A debug message issued when the server is about to obtain schema version
|
||||
|
@ -7,6 +7,8 @@
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
|
||||
extern const isc::log::MessageID PGSQL_DEINIT_OK = "PGSQL_DEINIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_INIT_OK = "PGSQL_INIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_LB_ADD_ADDR4 = "PGSQL_LB_ADD_ADDR4";
|
||||
extern const isc::log::MessageID PGSQL_LB_ADD_ADDR6 = "PGSQL_LB_ADD_ADDR6";
|
||||
extern const isc::log::MessageID PGSQL_LB_COMMIT = "PGSQL_LB_COMMIT";
|
||||
@ -14,7 +16,6 @@ extern const isc::log::MessageID PGSQL_LB_DB = "PGSQL_LB_DB";
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED = "PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED";
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE = "PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE";
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_FAILED = "PGSQL_LB_DB_RECONNECT_FAILED";
|
||||
extern const isc::log::MessageID PGSQL_LB_DEINIT_OK = "PGSQL_LB_DEINIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_ADDR4 = "PGSQL_LB_DELETE_ADDR4";
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_ADDR6 = "PGSQL_LB_DELETE_ADDR6";
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_EXPIRED_RECLAIMED4 = "PGSQL_LB_DELETE_EXPIRED_RECLAIMED4";
|
||||
@ -44,7 +45,6 @@ extern const isc::log::MessageID PGSQL_LB_GET_SUBID_CLIENTID = "PGSQL_LB_GET_SUB
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_SUBID_HWADDR = "PGSQL_LB_GET_SUBID_HWADDR";
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_SUBID_PAGE6 = "PGSQL_LB_GET_SUBID_PAGE6";
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_VERSION = "PGSQL_LB_GET_VERSION";
|
||||
extern const isc::log::MessageID PGSQL_LB_INIT_OK = "PGSQL_LB_INIT_OK";
|
||||
extern const isc::log::MessageID PGSQL_LB_NEGATIVE_LEASES_STAT = "PGSQL_LB_NEGATIVE_LEASES_STAT";
|
||||
extern const isc::log::MessageID PGSQL_LB_NO_TLS_SUPPORT = "PGSQL_LB_NO_TLS_SUPPORT";
|
||||
extern const isc::log::MessageID PGSQL_LB_ROLLBACK = "PGSQL_LB_ROLLBACK";
|
||||
@ -64,6 +64,8 @@ extern const isc::log::MessageID PGSQL_LB_UPGRADE_EXTENDED_INFO6_PAGE = "PGSQL_L
|
||||
namespace {
|
||||
|
||||
const char* values[] = {
|
||||
"PGSQL_DEINIT_OK", "unloading PostgreSQL hooks library successful",
|
||||
"PGSQL_INIT_OK", "loading PostgreSQL hooks library successful",
|
||||
"PGSQL_LB_ADD_ADDR4", "adding IPv4 lease with address %1",
|
||||
"PGSQL_LB_ADD_ADDR6", "adding IPv6 lease with address %1, lease type %2",
|
||||
"PGSQL_LB_COMMIT", "committing to PostgreSQL database",
|
||||
@ -71,7 +73,6 @@ const char* values[] = {
|
||||
"PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED", "database reconnect failed: %1",
|
||||
"PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE", "scheduling attempt %1 of %2 in %3 milliseconds",
|
||||
"PGSQL_LB_DB_RECONNECT_FAILED", "maximum number of database reconnect attempts: %1, has been exhausted without success",
|
||||
"PGSQL_LB_DEINIT_OK", "unloading PostgreSQL LB hooks library successful",
|
||||
"PGSQL_LB_DELETE_ADDR4", "deleting lease for address %1",
|
||||
"PGSQL_LB_DELETE_ADDR6", "deleting lease for address %1",
|
||||
"PGSQL_LB_DELETE_EXPIRED_RECLAIMED4", "deleting reclaimed IPv4 leases that expired more than %1 seconds ago",
|
||||
@ -101,7 +102,6 @@ const char* values[] = {
|
||||
"PGSQL_LB_GET_SUBID_HWADDR", "obtaining IPv4 lease for subnet ID %1 and hardware address %2",
|
||||
"PGSQL_LB_GET_SUBID_PAGE6", "obtaining at most %1 IPv6 leases starting from address %2 for subnet ID %3",
|
||||
"PGSQL_LB_GET_VERSION", "obtaining schema version information",
|
||||
"PGSQL_LB_INIT_OK", "loading PostgreSQL LB hooks library successful",
|
||||
"PGSQL_LB_NEGATIVE_LEASES_STAT", "recount of leases returned a negative value",
|
||||
"PGSQL_LB_NO_TLS_SUPPORT", "Attempt to configure TLS (unsupported for PostgreSQL): %1",
|
||||
"PGSQL_LB_ROLLBACK", "rolling back PostgreSQL database",
|
||||
|
@ -8,6 +8,8 @@
|
||||
namespace isc {
|
||||
namespace dhcp {
|
||||
|
||||
extern const isc::log::MessageID PGSQL_DEINIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_INIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_LB_ADD_ADDR4;
|
||||
extern const isc::log::MessageID PGSQL_LB_ADD_ADDR6;
|
||||
extern const isc::log::MessageID PGSQL_LB_COMMIT;
|
||||
@ -15,7 +17,6 @@ extern const isc::log::MessageID PGSQL_LB_DB;
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_ATTEMPT_FAILED;
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_ATTEMPT_SCHEDULE;
|
||||
extern const isc::log::MessageID PGSQL_LB_DB_RECONNECT_FAILED;
|
||||
extern const isc::log::MessageID PGSQL_LB_DEINIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_ADDR4;
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_ADDR6;
|
||||
extern const isc::log::MessageID PGSQL_LB_DELETE_EXPIRED_RECLAIMED4;
|
||||
@ -45,7 +46,6 @@ extern const isc::log::MessageID PGSQL_LB_GET_SUBID_CLIENTID;
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_SUBID_HWADDR;
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_SUBID_PAGE6;
|
||||
extern const isc::log::MessageID PGSQL_LB_GET_VERSION;
|
||||
extern const isc::log::MessageID PGSQL_LB_INIT_OK;
|
||||
extern const isc::log::MessageID PGSQL_LB_NEGATIVE_LEASES_STAT;
|
||||
extern const isc::log::MessageID PGSQL_LB_NO_TLS_SUPPORT;
|
||||
extern const isc::log::MessageID PGSQL_LB_ROLLBACK;
|
||||
|
@ -12,12 +12,12 @@ V6) is about to open a PostgreSQL lease database. The parameters of the
|
||||
connection including database name and username needed to access it
|
||||
(but not the password if any) are logged.
|
||||
|
||||
% PGSQL_LB_DEINIT_OK unloading PostgreSQL LB hooks library successful
|
||||
This informational message indicates that the PostgreSLQ Lease Backend hooks
|
||||
% PGSQL_DEINIT_OK unloading PostgreSQL hooks library successful
|
||||
This informational message indicates that the PostgreSQL Backend hooks
|
||||
library has been unloaded successfully.
|
||||
|
||||
% PGSQL_LB_INIT_OK loading PostgreSQL LB hooks library successful
|
||||
This informational message indicates that the PostgreSQL Lease Backend hooks
|
||||
% PGSQL_INIT_OK loading PostgreSQL hooks library successful
|
||||
This informational message indicates that the PostgreSQL Backend hooks
|
||||
library has been loaded successfully. Enjoy!
|
||||
|
||||
% PGSQL_LB_ADD_ADDR4 adding IPv4 lease with address %1
|
||||
|
@ -99,7 +99,7 @@ def check_that_debug_log_levels_are_documented(messages, debug_levels, log_lines
|
||||
for message_id, message in messages.items():
|
||||
log_level = None
|
||||
for line in log_lines:
|
||||
if line.startswith('LOG_DEBUG') and re.search(fr'LOG_DEBUG\(.*\b{message_id}\b', line):
|
||||
if re.match(fr'LOG_DEBUG\(.*\b{message_id}\b', line):
|
||||
log_level = line.split(',')[1].strip().replace('isc::log::', '').replace('log::', '')
|
||||
break
|
||||
if log_level is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user