Commit 6dbb47ba authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

log: add Log::setPattern()

parent e2a25df3
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment