Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
d8cd8b68
Commit
d8cd8b68
authored
Oct 01, 2017
by
Francis Dupont
Browse files
[5267] Fixed LoggingInfo::toElement
parent
cdfbc195
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/logging_info.cc
View file @
d8cd8b68
...
@@ -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_
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment