16 #ifndef SURGSIM_FRAMEWORK_LOGGERMANAGER_H 17 #define SURGSIM_FRAMEWORK_LOGGERMANAGER_H 19 #include <boost/thread/mutex.hpp> 20 #include <unordered_map> 57 std::shared_ptr<Logger>
getLogger(
const std::string& name);
67 void setThreshold(
const std::string& path,
int threshold);
75 std::unordered_map<std::string, std::shared_ptr<Logger>> m_loggers;
78 std::vector<std::pair<std::string, int>> m_thresholds;
81 std::shared_ptr<LogOutput> m_defaultOutput;
84 int m_globalThreshold;
97 #endif //SURGSIM_FRAMEWORK_LOGGERMANAGER_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
int getThreshold() const
Return the threshold used by all loggers.
Definition: LoggerManager.cpp:79
~LoggerManager()
Destructor.
Definition: LoggerManager.cpp:38
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:85
std::shared_ptr< LogOutput > getDefaultOutput() const
Return the default output.
Definition: LoggerManager.cpp:48
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:114
Class to safely handle access to a group of loggers, manipulate the global logging threshold...
Definition: LoggerManager.h:33