mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
merge
This commit is contained in:
parent
4fa463dff6
commit
dac61d4e9c
@ -18,7 +18,6 @@
|
||||
namespace spdlog {
|
||||
namespace env {
|
||||
|
||||
|
||||
using name_val_pair = std::pair<std::string, std::string>;
|
||||
|
||||
// inplace convert to lowercase
|
||||
|
@ -279,12 +279,10 @@ SPDLOG_INLINE void registry::set_configs(logger_cfgs configs)
|
||||
auto &pattern = cfg_it->second.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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
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 &pattern = logger_cfg.second.pattern;
|
||||
|
||||
|
||||
if (auto logger = this->get(logger_name))
|
||||
{
|
||||
logger->set_level(level);
|
||||
logger->set_pattern(pattern);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
SPDLOG_INLINE registry ®istry::instance()
|
||||
{
|
||||
static registry s_instance;
|
||||
|
@ -24,9 +24,6 @@ namespace details {
|
||||
class thread_pool;
|
||||
class periodic_worker;
|
||||
|
||||
|
||||
|
||||
|
||||
class registry
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user