24 std::list<LoggerSpecification> specs;
25 for (
LoggingInfo const& logging_info : logging_info_) {
29 specs.push_front(logging_info.toSpec());
31 specs.push_back(logging_info.toSpec());
35 manager.
process(specs.begin(), specs.end());
41 if (logging_info_.size() != other.logging_info_.size()) {
47 for (LoggingInfoStorage::const_iterator this_it =
48 logging_info_.begin(); this_it != logging_info_.end();
51 for (LoggingInfoStorage::const_iterator other_it =
52 other.logging_info_.begin();
53 other_it != other.logging_info_.end(); ++other_it) {
54 if (this_it->equals(*other_it)) {
66 if ((config_ctl_info_ && !other.config_ctl_info_) ||
67 (!config_ctl_info_ && other.config_ctl_info_) ||
68 ((config_ctl_info_ && other.config_ctl_info_) &&
69 (!config_ctl_info_->equals(*(other.config_ctl_info_))))) {
79 other.logging_info_.clear();
80 for (
auto const& it : logging_info_) {
81 other.addLoggingInfo(it);
85 if (config_ctl_info_) {
88 other.config_ctl_info_.reset();
92 other.server_tag_ = server_tag_;
98 if (!other.logging_info_.empty()) {
99 logging_info_ = other.logging_info_;
103 if (other.config_ctl_info_) {
104 if (config_ctl_info_) {
105 config_ctl_info_->merge(*other.config_ctl_info_);
107 config_ctl_info_ = other.config_ctl_info_;
112 if (!other.server_tag_.unspecified()) {
113 server_tag_ = other.server_tag_.
get();
122 if (!logging_info_.empty()) {
125 for (LoggingInfoStorage::const_iterator logger =
126 logging_info_.cbegin();
127 logger != logging_info_.cend(); ++logger) {
128 loggers->add(logger->toElement());
130 result->set(
"loggers", loggers);
static ElementPtr create(const Position &pos=ZERO_POSITION())
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
static ElementPtr createList(const Position &pos=ZERO_POSITION())
Creates an empty ListElement type ElementPtr.
void process(T start, T finish)
Process Specifications.
Base class for all configurations.
void applyLoggingCfg() const
Apply logging configuration to log4cplus.
virtual isc::data::ElementPtr toElement() const
Converts to Element representation.
void copy(ConfigBase &new_config) const
Copies the current configuration to a new configuration.
virtual void merge(ConfigBase &other)
Merges specified configuration into this configuration.
bool equals(const ConfigBase &other) const
Compares two configuration.
Embodies configuration information used during a server's configuration process.
structure that describes one logging entry
T get() const
Retrieves the encapsulated value.
void unspecified(bool unspecified)
Modifies the flag that indicates whether the value is specified or unspecified.
boost::shared_ptr< Element > ElementPtr
const std::string & getRootLoggerName()
Get root logger name.
Defines the logger used by the top-level component of kea-lfc.