mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[#2279] "loggers" should be inside the Dhcp[4|6] map
This commit is contained in:
@@ -598,10 +598,7 @@ SrvConfig::sanityChecksLifetime(const SrvConfig& target_config,
|
||||
ElementPtr
|
||||
SrvConfig::toElement() const {
|
||||
// Top level map
|
||||
ElementPtr result = ConfigBase::toElement();
|
||||
|
||||
// The "server-tag" is added by configured globals
|
||||
result->remove("server-tag");
|
||||
ElementPtr result = Element::createMap();
|
||||
|
||||
// Get family for the configuration manager
|
||||
uint16_t family = CfgMgr::instance().getFamily();
|
||||
@@ -609,6 +606,19 @@ SrvConfig::toElement() const {
|
||||
// DhcpX global map initialized from configured globals
|
||||
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
|
||||
contextToElement(dhcp);
|
||||
|
||||
|
Reference in New Issue
Block a user