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 <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.
§ getDefaultLogger()
std::shared_ptr< Logger > SurgSim::Framework::LoggerManager::getDefaultLogger |
( |
| ) |
|
Gets the default logger.
- Returns
- The default logger.
§ 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.
§ 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. |
The documentation for this class was generated from the following files: