An object that can be used to control logging parameters, such as verbosity and log output destination.
More...
#include <SurgSim/Framework/Logger.h>
An object that can be used to control logging parameters, such as verbosity and log output destination.
SurgSim::Framework::Logger::~Logger |
( |
| ) |
|
|
inline |
SurgSim::Framework::Logger::Logger |
( |
const std::string & |
name, |
|
|
std::shared_ptr< LogOutput > |
output |
|
) |
| |
|
private |
Constructor.
- Parameters
-
name | The name used for this logger. |
output | The LogOutput instance used to display or log the data. |
static std::shared_ptr<Logger> SurgSim::Framework::Logger::getDefaultLogger |
( |
| ) |
|
|
inlinestatic |
Get default logger.
- Returns
- Default logger
static std::shared_ptr<Logger> SurgSim::Framework::Logger::getLogger |
( |
const std::string & |
name | ) |
|
|
inlinestatic |
Get a logger by name from Logger Manager.
- Returns
- A logger with given name.
std::shared_ptr< LoggerManager > SurgSim::Framework::Logger::getLoggerManager |
( |
| ) |
|
|
static |
Get the logger manager.
- Returns
- Logger Manager that manages all loggers
std::string SurgSim::Framework::Logger::getName |
( |
| ) |
const |
|
inline |
Gets this logger's name.
- Returns
- The name.
std::shared_ptr<LogOutput> SurgSim::Framework::Logger::getOutput |
( |
| ) |
const |
|
inline |
Gets the output object used by this logger.
- Returns
- The current output object used this logger.
int SurgSim::Framework::Logger::getThreshold |
( |
| ) |
const |
|
inline |
Gets the logging threshold.
Anything message with less than this level will be ignored.
- Returns
- The threshold value.
void SurgSim::Framework::Logger::setOutput |
( |
std::shared_ptr< LogOutput > |
val | ) |
|
|
inline |
Sets the output object used by this logger.
- Parameters
-
val | The output object to be used. |
void SurgSim::Framework::Logger::setThreshold |
( |
int |
val | ) |
|
|
inline |
Sets the logging threshold.
Anything message with less than this level will be ignored.
- Parameters
-
val | The value to be used as the threshold. |
bool SurgSim::Framework::Logger::writeMessage |
( |
const std::string & |
message | ) |
|
|
inline |
Uses the contained instance of LogOutput to write the log message.
- Returns
- true on success
- Parameters
-
message | the message to be printed |
std::string SurgSim::Framework::Logger::m_name |
|
private |
std::shared_ptr<LogOutput> SurgSim::Framework::Logger::m_output |
|
private |
int SurgSim::Framework::Logger::m_threshold |
|
private |
The documentation for this class was generated from the following files: