27 LoggingDestination::toElement()
const {
31 result->set(
"output", Element::create(
output_));
33 result->set(
"maxver", Element::create(maxver_));
35 result->set(
"maxsize", Element::create(
static_cast<long long>(maxsize_)));
37 result->set(
"flush", Element::create(flush_));
42 LoggingInfo::LoggingInfo()
43 :
name_(
"kea"), severity_(
isc::log::
INFO), debuglevel_(0) {
54 if (!default_logger.empty()) {
55 name_ = default_logger;
74 for (std::vector<LoggingDestination>::const_iterator
79 for (std::vector<LoggingDestination>::const_iterator
83 if (it_this->equals(*it_other)) {
102 static const std::string STDOUT =
"stdout";
103 static const std::string STDERR =
"stderr";
104 static const std::string SYSLOG =
"syslog";
105 static const std::string SYSLOG_COLON =
"syslog:";
110 for (std::vector<LoggingDestination>::const_iterator dest =
115 if (dest->output_ == STDOUT) {
117 option.
stream = OutputOption::STR_STDOUT;
119 }
else if (dest->output_ == STDERR) {
121 option.
stream = OutputOption::STR_STDERR;
123 }
else if (dest->output_ == SYSLOG) {
128 }
else if (dest->output_.find(SYSLOG_COLON) == 0) {
131 if (dest->output_ == SYSLOG_COLON) {
138 option.
facility = dest->output_.substr(SYSLOG_COLON.size());
145 option.
maxsize = dest->maxsize_;
146 option.
maxver = dest->maxver_;
150 option.
flush = dest->flush_;
165 result->set(
"name", Element::create(
name_));
169 for (std::vector<LoggingDestination>::const_iterator dest =
172 options->add(dest->toElement());
174 result->set(
"output_options", options);
177 std::string severity;
201 result->set(
"severity", Element::create(severity));
203 result->set(
"debuglevel", Element::create(
debuglevel_));