Commit d8cd8b68 authored by Francis Dupont's avatar Francis Dupont
Browse files

[5267] Fixed LoggingInfo::toElement

parent cdfbc195
...@@ -161,7 +161,8 @@ LoggingInfo::toElement() const { ...@@ -161,7 +161,8 @@ LoggingInfo::toElement() const {
ElementPtr result = Element::createMap(); ElementPtr result = Element::createMap();
// Set name // Set name
result->set("name", Element::create(name_)); result->set("name", Element::create(name_));
// Set output_options // Set output_options if not empty
if (!destinations_.empty()) {
ElementPtr options = Element::createList(); ElementPtr options = Element::createList();
for (std::vector<LoggingDestination>::const_iterator dest = for (std::vector<LoggingDestination>::const_iterator dest =
destinations_.cbegin(); destinations_.cbegin();
...@@ -169,6 +170,7 @@ LoggingInfo::toElement() const { ...@@ -169,6 +170,7 @@ LoggingInfo::toElement() const {
options->add(dest->toElement()); options->add(dest->toElement());
} }
result->set("output_options", options); result->set("output_options", options);
}
// Set severity // Set severity
std::string severity; std::string severity;
switch (severity_) { switch (severity_) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment