This commit is contained in:
gabime
2019-12-08 17:08:20 +02:00
parent abbbda6f74
commit 0f24399887
7 changed files with 144 additions and 161 deletions

View File

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