opensurgsim
|
The logging API used by OpenSurgSim code. More...
Modules | |
Internal logging helpers | |
Not meant for public consumption. | |
Files | |
file | Log.h |
The convenience header that provides the entirety of the logging API. | |
Classes | |
class | SurgSim::Framework::Logger |
An object that can be used to control logging parameters, such as verbosity and log output destination. More... | |
Macros | |
#define | SURGSIM_LOG(logger, level) |
Logs a message to the specified logger with the short level name. More... | |
#define | SURGSIM_LOG_DEBUG(logger) SURGSIM_LOG(logger, DEBUG) |
Logs a message to the specified logger at the DEBUG level. More... | |
#define | SURGSIM_LOG_INFO(logger) SURGSIM_LOG(logger, INFO) |
Logs a message to the specified logger at the INFO level. More... | |
#define | SURGSIM_LOG_WARNING(logger) SURGSIM_LOG(logger, WARNING) |
Logs a message to the specified logger at the WARNING level. More... | |
#define | SURGSIM_LOG_SEVERE(logger) SURGSIM_LOG(logger, SEVERE) |
Logs a message to the specified logger at the SEVERE level. More... | |
#define | SURGSIM_LOG_CRITICAL(logger) SURGSIM_LOG(logger, CRITICAL) |
Logs a message to the specified logger at the CRITICAL level. More... | |
#define | SURGSIM_LOG_IF(condition, logger, level) |
Logs a message to the specified logger with the short level name if condition is true. More... | |
#define | SURGSIM_LOG_ONCE(logger, level) |
Logs a message to the specified logger with the short level name, but only the first time this statement is reached. More... | |
#define | SURGSIM_LOG_ONCE_IF(condition, logger, level) |
Logs a message to the specified logger with the short level name if condition is true, but only the first time this particular condition is true. More... | |
The logging API used by OpenSurgSim code.
#define SURGSIM_LOG | ( | logger, | |
level | |||
) |
Logs a message to the specified logger
with the short level
name.
logger | Logger used to log the message |
level | Level of this log message (DEBUG, INFO, WARNING, SEVERE or CRITICAL). |
Example
#define SURGSIM_LOG_CRITICAL | ( | logger | ) | SURGSIM_LOG(logger, CRITICAL) |
Logs a message to the specified logger
at the CRITICAL level.
logger | Logger used to log the message |
Example
#define SURGSIM_LOG_DEBUG | ( | logger | ) | SURGSIM_LOG(logger, DEBUG) |
Logs a message to the specified logger
at the DEBUG level.
logger | Logger used to log the message |
Example
#define SURGSIM_LOG_IF | ( | condition, | |
logger, | |||
level | |||
) |
Logs a message to the specified logger
with the short level
name if condition
is true.
condition | Condition to test. |
logger | Logger used to log the message. |
level | Level of this log message (DEBUG, INFO, WARNING, SEVERE or CRITICAL). |
Example
#define SURGSIM_LOG_INFO | ( | logger | ) | SURGSIM_LOG(logger, INFO) |
Logs a message to the specified logger
at the INFO level.
logger | Logger used to log the message |
Example
#define SURGSIM_LOG_ONCE | ( | logger, | |
level | |||
) |
Logs a message to the specified logger
with the short level
name, but only the first time this statement is reached.
logger | Logger used to log the message. |
level | Level of this log message (DEBUG, INFO, WARNING, SEVERE or CRITICAL). |
Example
#define SURGSIM_LOG_ONCE_IF | ( | condition, | |
logger, | |||
level | |||
) |
Logs a message to the specified logger
with the short level
name if condition
is true, but only the first time this particular condition is true.
condition | Condition to test |
logger | Logger used to log the message |
level | Level of this log message (DEBUG, INFO, WARNING, SEVERE or CRITICAL). |
Example
#define SURGSIM_LOG_SEVERE | ( | logger | ) | SURGSIM_LOG(logger, SEVERE) |
Logs a message to the specified logger
at the SEVERE level.
logger | Logger used to log the message |
Example
#define SURGSIM_LOG_WARNING | ( | logger | ) | SURGSIM_LOG(logger, WARNING) |
Logs a message to the specified logger
at the WARNING level.
logger | Logger used to log the message |
Example
Logging levels.
Please note that most logging macros take an abbreviated version of these enumerations, without the leading LOG_LEVEL_
, i.e. one of DEBUG
, INFO
, WARNING
, SEVERE
or CRITICAL
.