Console.h File Reference
#include <string>
Include dependency graph for Console.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ompl::msg::OutputHandler
 Generic class to handle output from a piece of code. More...
 
class  ompl::msg::OutputHandlerSTD
 Default implementation of OutputHandler. This sends the information to the console. More...
 
class  ompl::msg::OutputHandlerFile
 Implementation of OutputHandler that saves messages in a file. More...
 

Namespaces

 ompl
 Main namespace. Contains everything in this library.
 
 ompl::msg
 Message namespace. This contains classes needed to output error messages (or logging) from within the library. Message logging can be performed with logging macros.
 

Macros

#define OMPL_ERROR(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_ERROR, fmt, ##__VA_ARGS__)
 Log a formatted error string. More...
 
#define OMPL_WARN(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_WARN, fmt, ##__VA_ARGS__)
 Log a formatted warning string. More...
 
#define OMPL_INFORM(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_INFO, fmt, ##__VA_ARGS__)
 Log a formatted information string. More...
 
#define OMPL_DEBUG(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_DEBUG, fmt, ##__VA_ARGS__)
 Log a formatted debugging string. More...
 
#define OMPL_DEVMSG1(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_DEV1, fmt, ##__VA_ARGS__)
 
#define OMPL_DEVMSG2(fmt, ...)   ompl::msg::log(__FILE__, __LINE__, ompl::msg::LOG_DEV2, fmt, ##__VA_ARGS__)
 

Enumerations

enum  ompl::msg::LogLevel {
  LOG_DEV2 = -2, LOG_DEV1 = -1, LOG_DEBUG = 0, LOG_INFO,
  LOG_WARN, LOG_ERROR, LOG_NONE
}
 The set of priorities for message logging.
 

Functions

void ompl::msg::noOutputHandler ()
 This function instructs ompl that no messages should be outputted. Equivalent to useOutputHandler(nullptr)
 
void ompl::msg::restorePreviousOutputHandler ()
 Restore the output handler that was previously in use (if any)
 
void ompl::msg::useOutputHandler (OutputHandler *oh)
 Specify the instance of the OutputHandler to use. By default, this is OutputHandlerSTD.
 
OutputHandler * ompl::msg::getOutputHandler ()
 Get the instance of the OutputHandler currently used. This is nullptr in case there is no output handler.
 
void ompl::msg::setLogLevel (LogLevel level)
 Set the minimum level of logging data to output. Messages with lower logging levels will not be recorded.
 
LogLevel ompl::msg::getLogLevel ()
 Retrieve the current level of logging data. Messages with lower logging levels will not be recorded.
 
void ompl::msg::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. Formats the message string given the arguments and forwards the string to the output handler.