From: Tomek Mrugalski Date: Thu, 25 Sep 2014 10:42:37 +0000 (+0200) Subject: [master] Removed obsolete funtion X-Git-Tag: rt3470_base~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e61395e5c863df878478b043e5a0f05bae9dbb4;p=thirdparty%2Fkea.git [master] Removed obsolete funtion --- diff --git a/src/lib/dhcpsrv/logging.cc b/src/lib/dhcpsrv/logging.cc index 466e698bda..bf783842e8 100644 --- a/src/lib/dhcpsrv/logging.cc +++ b/src/lib/dhcpsrv/logging.cc @@ -150,72 +150,5 @@ void LogConfigParser::parseOutputOptions(std::vector& destin } } -void LogConfigParser::applyConfiguration() { - - static const std::string STDOUT = "stdout"; - static const std::string STDERR = "stderr"; - static const std::string SYSLOG = "syslog"; - static const std::string SYSLOG_COLON = "syslog:"; - - std::vector specs; - - // Now iterate through all specified loggers - const LoggingInfoStorage& logging_info = config_->getLoggingInfo(); - for (LoggingInfoStorage::const_iterator it = logging_info.begin(); - it != logging_info.end(); ++it) { - - // Prepare the objects to define the logging specification - LoggerSpecification spec(it->name_, - it->severity_, - it->debuglevel_); - OutputOption option; - - for (std::vector::const_iterator dest = it->destinations_.begin(); - dest != it->destinations_.end(); ++dest) { - - // Set up output option according to destination specification - if (dest->output_ == STDOUT) { - option.destination = OutputOption::DEST_CONSOLE; - option.stream = OutputOption::STR_STDOUT; - - } else if (dest->output_ == STDERR) { - option.destination = OutputOption::DEST_CONSOLE; - option.stream = OutputOption::STR_STDERR; - - } else if (dest->output_ == SYSLOG) { - option.destination = OutputOption::DEST_SYSLOG; - // Use default specified in OutputOption constructor for the - // syslog destination - - } else if (dest->output_.find(SYSLOG_COLON) == 0) { - option.destination = OutputOption::DEST_SYSLOG; - // Must take account of the string actually being "syslog:" - if (dest->output_ == SYSLOG_COLON) { - // The expected syntax is syslog:facility. User skipped - // the logging name, so we'll just use the default ("kea") - option.facility = isc::log::getDefaultRootLoggerName(); - - } else { - // Everything else in the string is the facility name - option.facility = dest->output_.substr(SYSLOG_COLON.size()); - } - - } else { - // Not a recognised destination, assume a file. - option.destination = OutputOption::DEST_FILE; - option.filename = dest->output_; - } - - // ... and set the destination - spec.addOutputOption(option); - } - - specs.push_back(spec); - } - - LoggerManager manager; - manager.process(specs.begin(), specs.end()); -} - } // namespace isc::dhcp } // namespace isc diff --git a/src/lib/dhcpsrv/logging.h b/src/lib/dhcpsrv/logging.h index af143f4c0d..212d3f1f36 100644 --- a/src/lib/dhcpsrv/logging.h +++ b/src/lib/dhcpsrv/logging.h @@ -64,9 +64,6 @@ public: void parseConfiguration(const isc::data::ConstElementPtr& log_config, bool verbose = false); - /// @brief Applies stored configuration - void applyConfiguration(); - private: /// @brief Parses one JSON structure in Logging/loggers" array