From bb6afeceea763fdfd012b8a2b6e9e4247f2d623d Mon Sep 17 00:00:00 2001 From: Marcin Siodelski Date: Thu, 17 Jan 2013 12:51:38 +0100 Subject: [PATCH] [2637] Use logger to issue the warning about using memfile lease backend. --- src/lib/dhcpsrv/dhcpsrv_messages.mes | 6 ++++++ src/lib/dhcpsrv/memfile_lease_mgr.cc | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/dhcpsrv/dhcpsrv_messages.mes b/src/lib/dhcpsrv/dhcpsrv_messages.mes index 27f12fc947..8f5a467085 100644 --- a/src/lib/dhcpsrv/dhcpsrv_messages.mes +++ b/src/lib/dhcpsrv/dhcpsrv_messages.mes @@ -226,6 +226,12 @@ a database backend, but where no 'type' keyword has been included in the access string. The access string (less any passwords) is included in the message. +% DHCPSRV_USING_MEMFILE_BACKEND using memfile database backend, leases will be lost after restart +This warning message is issued when the server is configured to use default +'memfile' backend to store leases. The leases held by this backend are +lost on server's restart. Currently 'memfile' backend is usable for testing +purposes mainly. + % DHCPSRV_UNKNOWN_DB unknown database type: %1 The database access string specified a database type (given in the message) that is unknown to the software. This is a configuration error. diff --git a/src/lib/dhcpsrv/memfile_lease_mgr.cc b/src/lib/dhcpsrv/memfile_lease_mgr.cc index 34f21e93ce..050012b10f 100644 --- a/src/lib/dhcpsrv/memfile_lease_mgr.cc +++ b/src/lib/dhcpsrv/memfile_lease_mgr.cc @@ -22,8 +22,7 @@ using namespace isc::dhcp; Memfile_LeaseMgr::Memfile_LeaseMgr(const ParameterMap& parameters) : LeaseMgr(parameters) { - std::cout << "Warning: Using memfile database backend. It is usable for limited" - << " testing only. Leases will be lost after restart." << std::endl; + LOG_WARN(dhcpsrv_logger, DHCPSRV_USING_MEMFILE_BACKEND); } Memfile_LeaseMgr::~Memfile_LeaseMgr() { -- 2.47.3