21 ConfigBase::applyLoggingCfg()
const {
23 std::list<LoggerSpecification> specs;
24 for (LoggingInfoStorage::const_iterator it = logging_info_.begin();
25 it != logging_info_.end(); ++it) {
26 specs.push_back(it->toSpec());
29 manager.
process(specs.begin(), specs.end());
35 if (logging_info_.size() != other.logging_info_.size()) {
41 for (LoggingInfoStorage::const_iterator this_it =
42 logging_info_.begin(); this_it != logging_info_.end();
45 for (LoggingInfoStorage::const_iterator other_it =
46 other.logging_info_.begin();
47 other_it != other.logging_info_.end(); ++other_it) {
48 if (this_it->equals(*other_it)) {
60 if ((config_ctl_info_ && !other.config_ctl_info_) ||
61 (!config_ctl_info_ && other.config_ctl_info_) ||
62 ((config_ctl_info_ && other.config_ctl_info_) &&
63 (!config_ctl_info_->equals(*(other.config_ctl_info_))))) {
73 other.logging_info_.clear();
74 for (LoggingInfoStorage::const_iterator it = logging_info_.begin();
75 it != logging_info_.end(); ++it) {
80 if (config_ctl_info_) {
83 other.config_ctl_info_.reset();
87 other.server_tag_ = server_tag_;
93 if (!other.logging_info_.empty()) {
94 logging_info_ = other.logging_info_;
98 if (other.config_ctl_info_) {
99 if (config_ctl_info_) {
100 config_ctl_info_->merge(*other.config_ctl_info_);
102 config_ctl_info_ = other.config_ctl_info_;
108 server_tag_ = other.server_tag_.
get();
113 ConfigBase::toElement()
const {
117 if (!logging_info_.empty()) {
120 for (LoggingInfoStorage::const_iterator
logger =
121 logging_info_.cbegin();
123 loggers->add(
logger->toElement());
125 result->set(
"loggers", loggers);
129 if (!server_tag_.unspecified()) {
130 result->set(
"server-tag", Element::create(server_tag_.get()));
void unspecified(bool unspecified)
Modifies the flag that indicates whether the value is specified or unspecified.
void addLoggingInfo(const process::LoggingInfo &logging_info)
Sets logging specific configuration.
void process(T start, T finish)
Process Specifications.
Base class for all configurations.
Embodies configuration information used during a server's configuration process.
boost::shared_ptr< Element > ElementPtr
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
Defines the logger used by the top-level component of kea-dhcp-ddns.
isc::log::Logger logger("asiodns")
Use the ASIO logger.
T get() const
Retrieves the encapsulated value.
void merge(ElementPtr element, ConstElementPtr other)
Merges the data from other into element.