Commit 2ac49b90 authored by gabi's avatar gabi

Bug fix in registry

parent 1814c31f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment