opensurgsim
|
Not meant for public consumption. More...
Files | |
file | LogMacros.h |
Macros used for logging. | |
Classes | |
class | SurgSim::Framework::LogMessage |
Specialization, handles flush on destruction. More... | |
class | SurgSim::Framework::LogMessageBase |
LogMessageBase is a base class to be used to customize messages for logging textual information can be put into a log message by using the << operator in general the message class will output all of its information when the destructor is being invoked, formats the incoming message to timestamp it and adds information about the logger. More... | |
Macros | |
#define | SURGSIM_LOG_LEVEL(level) ::SurgSim::Framework::LOG_LEVEL_ ## level |
Converts a short level name to the log level enum value. More... | |
#define | SURGSIM_FLAG_VARIABLE_NAME_HELPER(base, line) base ## line |
Generate a variable name that should be unique within a file. More... | |
#define | SURGSIM_FLAG_VARIABLE_NAME(base, line) SURGSIM_FLAG_VARIABLE_NAME_HELPER(base, line) |
Generate a variable name that should be unique within a file. More... | |
#define | SURGSIM_LOG_ONCE_VARIABLE SURGSIM_FLAG_VARIABLE_NAME(surgsimLogOnceFlag, __LINE__) |
Define a variable name that depends on the line number in the source file where the macro is called from. More... | |
Not meant for public consumption.
#define SURGSIM_FLAG_VARIABLE_NAME | ( | base, | |
line | |||
) | SURGSIM_FLAG_VARIABLE_NAME_HELPER(base, line) |
Generate a variable name that should be unique within a file.
The name will be unique unless this macro is used twice on the same source code line, e.g. due to macro expansion. Two macros are needed to make sure the argument is fully expanded.
#define SURGSIM_FLAG_VARIABLE_NAME_HELPER | ( | base, | |
line | |||
) | base ## line |
Generate a variable name that should be unique within a file.
The name will be unique unless this macro is used twice on the same source code line, e.g. due to macro expansion. Two macros are needed to make sure the argument is fully expanded.
#define SURGSIM_LOG_LEVEL | ( | level | ) | ::SurgSim::Framework::LOG_LEVEL_ ## level |
#define SURGSIM_LOG_ONCE_VARIABLE SURGSIM_FLAG_VARIABLE_NAME(surgsimLogOnceFlag, __LINE__) |
Define a variable name that depends on the line number in the source file where the macro is called from.
We need this because we can't just add braces to create a scope; that would break using << to add more info.