Bug fix in registry

This commit is contained in:
gabi 2014-11-07 16:57:10 +02:00
parent 1814c31ff3
commit 2ac49b90e6
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -60,6 +60,7 @@ public:
return found->second;
auto new_logger = std::make_shared<logger>(logger_name, sinks_begin, sinks_end);
if (_formatter)
new_logger->set_formatter(_formatter);
new_logger->set_level(_level);
_loggers[logger_name] = new_logger;