16 #ifndef SURGSIM_FRAMEWORK_LOGGERMANAGER_H 17 #define SURGSIM_FRAMEWORK_LOGGERMANAGER_H 19 #include <unordered_map> 20 #include <boost/thread/mutex.hpp> 74 std::unordered_map<std::string, std::shared_ptr<Logger>>
m_loggers;
93 #endif //SURGSIM_FRAMEWORK_LOGGERMANAGER_H Definition: DriveElementFromInputBehavior.cpp:27
std::unordered_map< std::string, std::shared_ptr< Logger > > m_loggers
Keep track of all the loggers.
Definition: LoggerManager.h:74
int m_globalThreshold
Threshold used by all loggers.
Definition: LoggerManager.h:80
~LoggerManager()
Destructor.
Definition: LoggerManager.cpp:38
std::shared_ptr< LogOutput > getDefaultOutput() const
Return the default output.
Definition: LoggerManager.cpp:48
boost::mutex m_mutex
Definition: LoggerManager.h:82
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
std::shared_ptr< LogOutput > m_defaultOutput
Use for default output of the logger.
Definition: LoggerManager.h:77
void setThreshold(int threshold)
Sets a threshold for all loggers.
Definition: LoggerManager.cpp:54
std::shared_ptr< Logger > getLogger(const std::string &name)
Gets a logger with a given name, creates a new one if none exists or the logger has been deallocated...
Definition: LoggerManager.cpp:84
int getThreshold() const
Return the threshold used by all loggers.
Definition: LoggerManager.cpp:78
void setDefaultOutput(std::shared_ptr< LogOutput > output)
Sets/Changes default output.
Definition: LoggerManager.cpp:43
LoggerManager()
Constructor.
Definition: LoggerManager.cpp:30
std::shared_ptr< Logger > getDefaultLogger()
Gets the default logger.
Definition: LoggerManager.cpp:105
Class to safely handle access to a group of loggers, manipulate the global logging threshold...
Definition: LoggerManager.h:32
LoggerManager & operator=(const LoggerManager &)