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.
SurgSim::Framework::LoggerManager::LoggerManager |
( |
| ) |
|
SurgSim::Framework::LoggerManager::~LoggerManager |
( |
| ) |
|
SurgSim::Framework::LoggerManager::LoggerManager |
( |
const LoggerManager & |
| ) |
|
|
private |
std::shared_ptr< Logger > SurgSim::Framework::LoggerManager::getDefaultLogger |
( |
| ) |
|
Gets the default logger.
- Returns
- The default logger.
std::shared_ptr< LogOutput > SurgSim::Framework::LoggerManager::getDefaultOutput |
( |
| ) |
const |
Return the default output.
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.
int SurgSim::Framework::LoggerManager::getThreshold |
( |
| ) |
const |
Return the threshold used by all loggers.
- Returns
- Threshold used by all the loggers.
void SurgSim::Framework::LoggerManager::setDefaultOutput |
( |
std::shared_ptr< LogOutput > |
output | ) |
|
Sets/Changes default output.
- Parameters
-
output | The output class to be used. |
void SurgSim::Framework::LoggerManager::setThreshold |
( |
int |
threshold | ) |
|
Sets a threshold for all loggers.
- Parameters
-
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. |
std::shared_ptr<LogOutput> SurgSim::Framework::LoggerManager::m_defaultOutput |
|
private |
Use for default output of the logger.
int SurgSim::Framework::LoggerManager::m_globalThreshold |
|
private |
Threshold used by all loggers.
std::unordered_map<std::string, std::shared_ptr<Logger> > SurgSim::Framework::LoggerManager::m_loggers |
|
private |
Keep track of all the loggers.
boost::mutex SurgSim::Framework::LoggerManager::m_mutex |
|
private |
The documentation for this class was generated from the following files: