Go to the documentation of this file.
37 #ifndef CONSOLE_BRIDGE_CONSOLE_
38 #define CONSOLE_BRIDGE_CONSOLE_
45 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
46 #define CONSOLE_BRIDGE_DEPRECATED __attribute__ ((deprecated))
47 #elif defined(_MSC_VER)
48 #define CONSOLE_BRIDGE_DEPRECATED __declspec(deprecated)
50 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
51 #define CONSOLE_BRIDGE_DEPRECATED
78 #define CONSOLE_BRIDGE_logError(fmt, ...) \
79 console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_ERROR, fmt, ##__VA_ARGS__)
81 #define CONSOLE_BRIDGE_logWarn(fmt, ...) \
82 console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_WARN, fmt, ##__VA_ARGS__)
84 #define CONSOLE_BRIDGE_logInform(fmt, ...) \
85 console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_INFO, fmt, ##__VA_ARGS__)
87 #define CONSOLE_BRIDGE_logDebug(fmt, ...) \
88 console_bridge::log(__FILE__, __LINE__, console_bridge::CONSOLE_BRIDGE_LOG_DEBUG, fmt, ##__VA_ARGS__)
LogLevel
The set of priorities for message logging.
@ CONSOLE_BRIDGE_LOG_INFO
@ CONSOLE_BRIDGE_LOG_DEBUG
CONSOLE_BRIDGE_DEPRECATED void log_deprecated(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...
Message namespace. This contains classes needed to output error messages (or logging) from within the...
@ CONSOLE_BRIDGE_LOG_WARN
void log(const char *file, int line, LogLevel level, const char *m,...)
Root level logging function. This should not be invoked directly, but rather used via a logging macro...
@ CONSOLE_BRIDGE_LOG_NONE
GLsizei const GLchar *const * string
@ CONSOLE_BRIDGE_LOG_ERROR
FILE * file_
The file to save to.
Default implementation of OutputHandler. This sends the information to the console.
virtual void log(const std::string &text, LogLevel level, const char *filename, int line)
log a message to the output handler with the given text and logging level from a specific file and li...
virtual ~OutputHandlerFile(void)
void restorePreviousOutputHandler(void)
Restore the output handler that was previously in use (if any)
virtual void log(const std::string &text, LogLevel level, const char *filename, int line)=0
log a message to the output handler with the given text and logging level from a specific file and li...
#define CONSOLE_BRIDGE_DEPRECATED
OutputHandler * getOutputHandler(void)
Get the instance of the OutputHandler currently used. This is NULL in case there is no output handler...
static void CONSOLE_BRIDGE_DEPRECATED console_bridge_deprecated()
Implementation of OutputHandler that saves messages in a file.
void useOutputHandler(OutputHandler *oh)
Specify the instance of the OutputHandler to use. By default, this is OutputHandlerSTD.
void setLogLevel(LogLevel level)
Set the minimum level of logging data to output. Messages with lower logging levels will not be recor...
virtual ~OutputHandler(void)
Generic class to handle output from a piece of code.
OutputHandlerFile(const char *filename)
The name of the file in which to save the message data.
LogLevel getLogLevel(void)
Retrieve the current level of logging data. Messages with lower logging levels will not be recorded.
void noOutputHandler(void)
This function instructs ompl that no messages should be outputted. Equivalent to useOutputHandler(NUL...
virtual void log(const std::string &text, LogLevel level, const char *filename, int line)
log a message to the output handler with the given text and logging level from a specific file and li...
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01