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
6dbb47ba
Commit
6dbb47ba
authored
Nov 04, 2018
by
Steffen Vogel
🎅🏼
Browse files
log: add Log::setPattern()
parent
e2a25df3
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/villas/log.hpp
View file @
6dbb47ba
...
...
@@ -68,6 +68,7 @@ public:
Logger
get
(
const
std
::
string
&
name
);
void
setPattern
(
const
std
::
string
&
pattern
);
void
setLevel
(
Level
lvl
);
void
setLevel
(
const
std
::
string
&
lvl
);
...
...
lib/log.cpp
View file @
6dbb47ba
...
...
@@ -134,6 +134,13 @@ void Log::parse(json_t *cfg)
}
}
void
Log
::
setPattern
(
const
std
::
string
&
pat
)
{
pattern
=
pat
;
spdlog
::
set_pattern
(
pattern
,
spdlog
::
pattern_time_type
::
utc
);
}
void
Log
::
setLevel
(
Level
lvl
)
{
spdlog
::
set_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