ov_core::Printer class

Printer for open_vins that allows for various levels of printing to be done.

To set the global verbosity level one can do the following:

ov_core::Printer::setPrintLevel("WARNING");
ov_core::Printer::setPrintLevel(ov_core::Printer::PrintLevel::WARNING);

Public types

enum PrintLevel { ALL = 0, DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, SILENT = 5 }
The different print levels possible.

Public static variables

static PrintLevel current_print_level
The current print level.

Public static functions

static void setPrintLevel(const std::string& level)
Set the print level to use for all future printing to stdout.
static void setPrintLevel(PrintLevel level)
Set the print level to use for all future printing to stdout.
static void debugPrint(PrintLevel level, const char location[], const char line[], const char* format, ...)
The print function that prints to stdout.

Enum documentation

enum ov_core::Printer::PrintLevel

The different print levels possible.

  • PrintLevel::ALL : All PRINT_XXXX will output to the console
  • PrintLevel::DEBUG : "DEBUG", "INFO", "WARNING" and "ERROR" will be printed. "ALL" will be silenced
  • PrintLevel::INFO : "INFO", "WARNING" and "ERROR" will be printed. "ALL" and "DEBUG" will be silenced
  • PrintLevel::WARNING : "WARNING" and "ERROR" will be printed. "ALL", "DEBUG" and "INFO" will be silenced
  • PrintLevel::ERROR : Only "ERROR" will be printed. All the rest are silenced
  • PrintLevel::SILENT : All PRINT_XXXX will be silenced.

Function documentation

static void ov_core::Printer::setPrintLevel(const std::string& level)

Set the print level to use for all future printing to stdout.

Parameters
level The debug level to use

static void ov_core::Printer::setPrintLevel(PrintLevel level)

Set the print level to use for all future printing to stdout.

Parameters
level The debug level to use

static void ov_core::Printer::debugPrint(PrintLevel level, const char location[], const char line[], const char* format, ...)

The print function that prints to stdout.

Parameters
level the print level for this print call
location the location the print was made from
line the line the print was made from
format The printf format