mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
Bug fix in registry
This commit is contained in:
parent
1814c31ff3
commit
2ac49b90e6
@ -126,7 +126,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count
|
||||
{
|
||||
threads.push_back(std::thread([&]()
|
||||
{
|
||||
while (true)
|
||||
for(;;)
|
||||
{
|
||||
int counter = ++msg_counter;
|
||||
if (counter > howmany) break;
|
||||
|
@ -37,6 +37,7 @@ inline spdlog::logger::logger(const std::string& logger_name, const It& begin, c
|
||||
_sinks(begin, end),
|
||||
_formatter(std::make_shared<pattern_formatter>("%+"))
|
||||
{
|
||||
|
||||
// no support under vs2013 for member initialization for std::atomic
|
||||
_level = level::INFO;
|
||||
}
|
||||
|
@ -60,7 +60,8 @@ public:
|
||||
return found->second;
|
||||
|
||||
auto new_logger = std::make_shared<logger>(logger_name, sinks_begin, sinks_end);
|
||||
new_logger->set_formatter(_formatter);
|
||||
if (_formatter)
|
||||
new_logger->set_formatter(_formatter);
|
||||
new_logger->set_level(_level);
|
||||
_loggers[logger_name] = new_logger;
|
||||
return new_logger;
|
||||
|
Loading…
Reference in New Issue
Block a user