An object that can be used to control logging parameters, such as verbosity and log output destination.
More...
#include <Logger.h>
An object that can be used to control logging parameters, such as verbosity and log output destination.
§ getDefaultLogger()
static std::shared_ptr<Logger> SurgSim::Framework::Logger::getDefaultLogger |
( |
| ) |
|
|
inlinestatic |
Get default logger.
- Returns
- Default logger
§ getLogger()
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.
§ getLoggerManager()
std::shared_ptr< LoggerManager > SurgSim::Framework::Logger::getLoggerManager |
( |
| ) |
|
|
static |
Get the logger manager.
- Returns
- Logger Manager that manages all loggers
§ getName()
std::string SurgSim::Framework::Logger::getName |
( |
| ) |
const |
|
inline |
Gets this logger's name.
- Returns
- The name.
§ getOutput()
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.
§ getThreshold()
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.
§ setOutput()
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. |
§ setThreshold()
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. |
§ writeMessage()
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 |
The documentation for this class was generated from the following files:
- SurgSim/Framework/Logger.h
- SurgSim/Framework/Logger.cpp