This commit is contained in:
gabime
2019-12-08 17:07:52 +02:00
parent 1a5ee7ab83
commit abbbda6f74
3 changed files with 177 additions and 3 deletions

View File

@@ -9,11 +9,16 @@
#include <spdlog/spdlog.h>
#include <spdlog/cfg/env.h>
int main(int, char *[]) {
try {
auto cfg = spdlog::cfg::from_env();
for(auto &item:cfg)\
for(auto &item:cfg)
{
spdlog::info("[{:>8}] level: {} pattern: {}", item.first, spdlog::level::to_string_view(item.second.level), item.second.pattern);
spdlog::info("['{}'] level: {} pattern: {}", item.first, spdlog::level::to_string_view(item.second.level), item.second.pattern);
}
}catch(spdlog::spdlog_ex& ex){
spdlog::info("spdlog_ex: {}", ex.what());
}
}