Class to safely handle access to a group of loggers, manipulate the global logging threshold, and fetch logger(s) from a global pool.
More...
#include <SurgSim/Framework/LoggerManager.h>
Class to safely handle access to a group of loggers, manipulate the global logging threshold, and fetch logger(s) from a global pool.
◆ LoggerManager() [1/2]
SurgSim::Framework::LoggerManager::LoggerManager |
( |
| ) |
|
◆ ~LoggerManager()
SurgSim::Framework::LoggerManager::~LoggerManager |
( |
| ) |
|
◆ LoggerManager() [2/2]
SurgSim::Framework::LoggerManager::LoggerManager |
( |
const LoggerManager & |
| ) |
|
|
private |
◆ getDefaultLogger()
std::shared_ptr< Logger > SurgSim::Framework::LoggerManager::getDefaultLogger |
( |
| ) |
|
Gets the default logger.
- Returns
- The default logger.
◆ getDefaultOutput()
std::shared_ptr< LogOutput > SurgSim::Framework::LoggerManager::getDefaultOutput |
( |
| ) |
const |
Return the default output.
◆ getLogger()
std::shared_ptr< Logger > SurgSim::Framework::LoggerManager::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.
- Parameters
-
- Returns
- The logger.
◆ getThreshold()
int SurgSim::Framework::LoggerManager::getThreshold |
( |
| ) |
const |
Return the threshold used by all loggers.
- Returns
- Threshold used by all the loggers.
◆ operator=()
◆ setDefaultOutput()
void SurgSim::Framework::LoggerManager::setDefaultOutput |
( |
std::shared_ptr< LogOutput > |
output | ) |
|
Sets/Changes default output.
- Parameters
-
output | The output class to be used. |
◆ setThreshold() [1/2]
void SurgSim::Framework::LoggerManager::setThreshold |
( |
int |
threshold | ) |
|
Sets a threshold for all loggers.
- Parameters
-
◆ setThreshold() [2/2]
void SurgSim::Framework::LoggerManager::setThreshold |
( |
const std::string & |
path, |
|
|
int |
threshold |
|
) |
| |
Sets a threshold for a subgroup of loggers, the group is chosen by finding all loggers whose pathname starts with the same string as the pathname given.
- Parameters
-
path | Full pathname of the file. |
threshold | The threshold to use for these loggers. |
◆ m_defaultOutput
std::shared_ptr<LogOutput> SurgSim::Framework::LoggerManager::m_defaultOutput |
|
private |
Use for default output of the logger.
◆ m_globalThreshold
int SurgSim::Framework::LoggerManager::m_globalThreshold |
|
private |
Threshold used by all loggers.
◆ m_loggers
std::unordered_map<std::string, std::shared_ptr<Logger> > SurgSim::Framework::LoggerManager::m_loggers |
|
private |
Keep track of all the loggers.
◆ m_mutex
boost::mutex SurgSim::Framework::LoggerManager::m_mutex |
|
private |
◆ m_thresholds
std::vector<std::pair<std::string, int> > SurgSim::Framework::LoggerManager::m_thresholds |
|
private |
Keep track of subgroup thresholds.
The documentation for this class was generated from the following files: