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