1
0
Fork 0
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:
Steffen Vogel 2018-11-04 17:09:25 +01:00
parent 205f35de1f
commit f4e46f58f5
2 changed files with 8 additions and 0 deletions

View file

@ -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);

View file

@ -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);