wip config from env

This commit is contained in:
gabime
2019-12-11 00:13:27 +02:00
parent d0ed873ab6
commit da2c15ecb4
3 changed files with 63 additions and 51 deletions

View File

@@ -9,12 +9,13 @@
int main(int, char *[])
{
spdlog::set_pattern("%v");
try
{
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);
spdlog::info("logger: '{}' level: '{}' pattern: '{}'", item.first, item.second.level_name, item.second.pattern);
}
}
catch (spdlog::spdlog_ex &ex)