37 #ifndef OMPL_UTIL_CONSOLE_
38 #define OMPL_UTIL_CONSOLE_
64 #define OMPL_ERROR(fmt, ...) ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_ERROR, fmt, ##__VA_ARGS__)
66 #define OMPL_WARN(fmt, ...) ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_WARN, fmt, ##__VA_ARGS__)
68 #define OMPL_INFORM(fmt, ...) ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_INFO, fmt, ##__VA_ARGS__)
70 #define OMPL_DEBUG(fmt, ...) ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_DEBUG, fmt, ##__VA_ARGS__)
111 virtual void log(
const std::string &text,
LogLevel level,
const char *filename,
int line) = 0;
124 virtual void log(
const std::string &text,
LogLevel level,
const char *filename,
int line);
138 virtual void log(
const std::string &text,
LogLevel level,
const char *filename,
int line);
170 void log(
const char *file,
int line,
LogLevel level,
const char* m, ...);
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...
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 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...
LogLevel getLogLevel(void)
Retrieve the current level of logging data. Messages with lower logging levels will not be recorded...
void setLogLevel(LogLevel level)
Set the minimum level of logging data to output. Messages with lower logging levels will not be recor...
Generic class to handle output from a piece of code.
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...
Implementation of OutputHandler that saves messages in a file.
Default implementation of OutputHandler. This sends the information to the console.
void useOutputHandler(OutputHandler *oh)
Specify the instance of the OutputHandler to use. By default, this is OutputHandlerSTD.
OutputHandlerFile(const char *filename)
The name of the file in which to save the message data.
OutputHandler * getOutputHandler(void)
Get the instance of the OutputHandler currently used. This is NULL in case there is no output handler...
void noOutputHandler(void)
This function instructs ompl that no messages should be outputted. Equivalent to useOutputHandler(NUL...
void restorePreviousOutputHandler(void)
Restore the output handler that was previously in use (if any)
LogLevel
The set of priorities for message logging.