mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
wip config from env
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user