mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 13:37:55 +00:00
[#2279] "loggers" should be inside the Dhcp[4|6] map
This commit is contained in:
@@ -597,11 +597,8 @@ SrvConfig::sanityChecksLifetime(const SrvConfig& target_config,
|
|||||||
|
|
||||||
ElementPtr
|
ElementPtr
|
||||||
SrvConfig::toElement() const {
|
SrvConfig::toElement() const {
|
||||||
// Toplevel map
|
// Top level map
|
||||||
ElementPtr result = ConfigBase::toElement();
|
ElementPtr result = Element::createMap();
|
||||||
|
|
||||||
// The "server-tag" is added by configured globals
|
|
||||||
result->remove("server-tag");
|
|
||||||
|
|
||||||
// Get family for the configuration manager
|
// Get family for the configuration manager
|
||||||
uint16_t family = CfgMgr::instance().getFamily();
|
uint16_t family = CfgMgr::instance().getFamily();
|
||||||
@@ -609,6 +606,19 @@ SrvConfig::toElement() const {
|
|||||||
// DhcpX global map initialized from configured globals
|
// DhcpX global map initialized from configured globals
|
||||||
ElementPtr dhcp = configured_globals_->toElement();
|
ElementPtr dhcp = configured_globals_->toElement();
|
||||||
|
|
||||||
|
auto loggers_info = getLoggingInfo();
|
||||||
|
// Was in the Logging global map.
|
||||||
|
if (!loggers_info.empty()) {
|
||||||
|
// Set loggers list
|
||||||
|
ElementPtr loggers = Element::createList();
|
||||||
|
for (LoggingInfoStorage::const_iterator logger =
|
||||||
|
loggers_info.cbegin();
|
||||||
|
logger != loggers_info.cend(); ++logger) {
|
||||||
|
loggers->add(logger->toElement());
|
||||||
|
}
|
||||||
|
dhcp->set("loggers", loggers);
|
||||||
|
}
|
||||||
|
|
||||||
// Set user-context
|
// Set user-context
|
||||||
contextToElement(dhcp);
|
contextToElement(dhcp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user