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__)
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...
Default implementation of OutputHandler. This sends the information to the console.
void noOutputHandler(void)
This function instructs ompl that no messages should be outputted. Equivalent to useOutputHandler(NUL...
Generic class to handle output from a piece of code.
LogLevel getLogLevel(void)
Retrieve the current level of logging data. Messages with lower logging levels will not be recorded...
GLsizei const GLchar *const * string
#define CONSOLE_BRIDGE_DEPRECATED
FILE * file_
The file to save to.
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)
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()
void restorePreviousOutputHandler(void)
Restore the output handler that was previously in use (if any)
Implementation of OutputHandler that saves messages in a file.
LogLevel
The set of priorities for message logging.
Message namespace. This contains classes needed to output error messages (or logging) from within the...
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...
void useOutputHandler(OutputHandler *oh)
Specify the instance of the OutputHandler to use. By default, this is OutputHandlerSTD.