Go to the documentation of this file.
16 #ifndef SURGSIM_FRAMEWORK_LOGGERMANAGER_H
17 #define SURGSIM_FRAMEWORK_LOGGERMANAGER_H
19 #include <boost/thread/mutex.hpp>
20 #include <unordered_map>
75 std::unordered_map<std::string, std::shared_ptr<Logger>>
m_loggers;
97 #endif //SURGSIM_FRAMEWORK_LOGGERMANAGER_H
boost::mutex m_mutex
Definition: LoggerManager.h:86
Class to safely handle access to a group of loggers, manipulate the global logging threshold,...
Definition: LoggerManager.h:34
LoggerManager()
Constructor.
Definition: LoggerManager.cpp:30
std::shared_ptr< Logger > getDefaultLogger()
Gets the default logger.
Definition: LoggerManager.cpp:114
int getThreshold() const
Return the threshold used by all loggers.
Definition: LoggerManager.cpp:79
Definition: CompoundShapeToGraphics.cpp:30
std::shared_ptr< LogOutput > m_defaultOutput
Use for default output of the logger.
Definition: LoggerManager.h:81
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:85
~LoggerManager()
Destructor.
Definition: LoggerManager.cpp:38
int m_globalThreshold
Threshold used by all loggers.
Definition: LoggerManager.h:84
void setThreshold(int threshold)
Sets a threshold for all loggers.
Definition: LoggerManager.cpp:54
std::vector< std::pair< std::string, int > > m_thresholds
Keep track of subgroup thresholds.
Definition: LoggerManager.h:78
std::shared_ptr< LogOutput > getDefaultOutput() const
Return the default output.
Definition: LoggerManager.cpp:48
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
void setDefaultOutput(std::shared_ptr< LogOutput > output)
Sets/Changes default output.
Definition: LoggerManager.cpp:43
LoggerManager(const LoggerManager &)
LoggerManager & operator=(const LoggerManager &)
std::unordered_map< std::string, std::shared_ptr< Logger > > m_loggers
Keep track of all the loggers.
Definition: LoggerManager.h:75