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());
Proxy for output stream, handed out to the log sources by the Logger::Module.
Severity
Severity levels used by the Logger.
void setMinSeverity(Severity minSeverity)
Set the minimum severity level to be passed to the logger.
StreamProxy getStream(Severity severity, std::string context)
Return an output stream object for the given severity.
static Logger & getInstance()
Obtain global instance of Logger singleton.
InvalidityTracer application module.
Logger::StreamProxy logger(Logger::Severity severity, std::string context)
Convenience function to obtain the logger stream.