mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 17:22:06 +08:00
merge
This commit is contained in:
parent
4fa463dff6
commit
dac61d4e9c
@ -18,7 +18,6 @@
|
|||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
namespace env {
|
namespace env {
|
||||||
|
|
||||||
|
|
||||||
using name_val_pair = std::pair<std::string, std::string>;
|
using name_val_pair = std::pair<std::string, std::string>;
|
||||||
|
|
||||||
// inplace convert to lowercase
|
// inplace convert to lowercase
|
||||||
|
@ -279,12 +279,10 @@ SPDLOG_INLINE void registry::set_configs(logger_cfgs configs)
|
|||||||
auto &pattern = cfg_it->second.pattern;
|
auto &pattern = cfg_it->second.pattern;
|
||||||
logger->set_formatter(details::make_unique<pattern_formatter>(pattern));
|
logger->set_formatter(details::make_unique<pattern_formatter>(pattern));
|
||||||
}
|
}
|
||||||
else //not found in cfgs - give it default settings
|
else // not found in cfgs - give it default settings
|
||||||
{
|
{
|
||||||
logger
|
logger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &logger_cfg : configs)
|
for (const auto &logger_cfg : configs)
|
||||||
@ -293,19 +291,14 @@ SPDLOG_INLINE void registry::set_configs(logger_cfgs configs)
|
|||||||
auto level = level::from_str(logger_cfg.second.level_name);
|
auto level = level::from_str(logger_cfg.second.level_name);
|
||||||
auto &pattern = logger_cfg.second.pattern;
|
auto &pattern = logger_cfg.second.pattern;
|
||||||
|
|
||||||
|
|
||||||
if (auto logger = this->get(logger_name))
|
if (auto logger = this->get(logger_name))
|
||||||
{
|
{
|
||||||
logger->set_level(level);
|
logger->set_level(level);
|
||||||
logger->set_pattern(pattern);
|
logger->set_pattern(pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SPDLOG_INLINE registry ®istry::instance()
|
SPDLOG_INLINE registry ®istry::instance()
|
||||||
{
|
{
|
||||||
static registry s_instance;
|
static registry s_instance;
|
||||||
|
@ -24,9 +24,6 @@ namespace details {
|
|||||||
class thread_pool;
|
class thread_pool;
|
||||||
class periodic_worker;
|
class periodic_worker;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class registry
|
class registry
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user