Go to the documentation of this file.
16 #ifndef SURGSIM_FRAMEWORK_LOGGER_H
17 #define SURGSIM_FRAMEWORK_LOGGER_H
67 return m_output->writeMessage(message);
109 static std::shared_ptr<Logger>
getLogger(
const std::string& name)
129 Logger(
const std::string& name, std::shared_ptr<LogOutput> output);
142 #endif // SURGSIM_FRAMEWORK_LOGGER_H
~Logger()
Destructor.
Definition: Logger.h:58
static std::shared_ptr< Logger > getLogger(const std::string &name)
Get a logger by name from Logger Manager.
Definition: Logger.h:109
Class to safely handle access to a group of loggers, manipulate the global logging threshold,...
Definition: LoggerManager.h:33
int m_threshold
Definition: Logger.h:131
Informational, notify of state changes.
Definition: Logger.h:41
Logger(const std::string &name, std::shared_ptr< LogOutput > output)
Constructor.
Definition: Logger.cpp:23
std::shared_ptr< LogOutput > m_output
Definition: Logger.h:133
bool writeMessage(const std::string &message)
Uses the contained instance of LogOutput to write the log message.
Definition: Logger.h:65
Definition: CompoundShapeToGraphics.cpp:29
static std::shared_ptr< LoggerManager > getLoggerManager()
Get the logger manager.
Definition: Logger.cpp:30
Used by assertion, after using this level the program will not be functional at all.
Definition: Logger.h:47
static std::shared_ptr< Logger > getDefaultLogger()
Get default logger.
Definition: Logger.h:116
Something failed and will impact functionality, some parts of the program will not function correctly...
Definition: Logger.h:45
std::string getName() const
Gets this logger's name.
Definition: Logger.h:102
void setOutput(std::shared_ptr< LogOutput > val)
Sets the output object used by this logger.
Definition: Logger.h:95
std::string m_name
Definition: Logger.h:132
int getThreshold() const
Gets the logging threshold.
Definition: Logger.h:73
void setThreshold(int val)
Sets the logging threshold.
Definition: Logger.h:81
std::shared_ptr< LogOutput > getOutput() const
Gets the output object used by this logger.
Definition: Logger.h:88
Use at your discretion.
Definition: Logger.h:39
Something failed, but the impact of the failure is not know or minimal (e.g. purely visual).
Definition: Logger.h:43
An object that can be used to control logging parameters, such as verbosity and log output destinatio...
Definition: Logger.h:51
LogLevel
Logging levels.
Definition: Logger.h:36