mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
log: add Log::setPattern()
This commit is contained in:
parent
205f35de1f
commit
f4e46f58f5
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue