Commit 10895796 authored by Pablo Arias's avatar Pablo Arias

Added mutexes to protect logger initialization and toggling automatic registration

parent fbc58ebe
......@@ -49,6 +49,7 @@ public:
void initialize_logger(std::shared_ptr<logger> new_logger)
{
std::lock_guard<std::mutex> lock(logger_map_mutex_);
new_logger->set_formatter(formatter_->clone());
if (err_handler_)
......@@ -222,6 +223,7 @@ public:
void set_automatic_registration(bool automatic_regsistration)
{
std::lock_guard<std::mutex> lock(logger_map_mutex_);
automatic_registration_ = automatic_regsistration;
}
......
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