5 #include <ChimeraTK/cppext/future_queue.hpp>
7 #include <boost/thread.hpp>
81 static std::shared_ptr<Logger>& getSharedPtr();
89 void log(
Severity severity, std::string context, std::string message) noexcept;
95 static std::string severityToString(
Severity severity);
105 cppext::future_queue<LogMessage> _messageQueue{10};
114 boost::thread _mainLoopThread{[
this] { mainLoop(); }};
132 return *getSharedPtr();
137 inline std::shared_ptr<Logger>& Logger::getSharedPtr() {
138 static std::shared_ptr<Logger> instance(
new Logger());