Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLAScommon
Commits
f5517430
Commit
f5517430
authored
Mar 26, 2019
by
Steffen Vogel
🎅🏼
Browse files
log: be strict when parsing logging configuration
parent
db832f52
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/log.cpp
View file @
f5517430
...
...
@@ -91,7 +91,7 @@ void Log::parse(json_t *cfg)
json_error_t
err
;
json_t
*
json_expressions
=
nullptr
;
ret
=
json_unpack_ex
(
cfg
,
&
err
,
0
,
"{ s?: s, s?: s, s?: s, s?: b, s?: s }"
,
ret
=
json_unpack_ex
(
cfg
,
&
err
,
JSON_STRICT
,
"{ s?: s, s?: s, s?: s, s?: b, s?: s }"
,
"level"
,
&
level
,
"file"
,
&
path
,
"expressions"
,
&
json_expressions
,
...
...
@@ -126,7 +126,7 @@ void Log::parse(json_t *cfg)
const
char
*
name
;
const
char
*
lvl
;
ret
=
json_unpack_ex
(
json_expression
,
&
err
,
0
,
"{ s: s, s: s }"
,
ret
=
json_unpack_ex
(
json_expression
,
&
err
,
JSON_STRICT
,
"{ s: s, s: s }"
,
"name"
,
&
name
,
"level"
,
&
lvl
);
...
...
Write
Preview
Supports
Markdown
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