Open3D (C++ API)  0.11.0
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
open3d::utility::Logger Class Reference

#include <Console.h>

Public Types

enum  TextColor {
  TextColor::Black = 0, TextColor::Red = 1, TextColor::Green = 2, TextColor::Yellow = 3,
  TextColor::Blue = 4, TextColor::Magenta = 5, TextColor::Cyan = 6, TextColor::White = 7
}
 

Public Member Functions

 Logger ()
 
 Logger (Logger const &)=delete
 
void operator= (Logger const &)=delete
 
void VError (const char *format, fmt::format_args args) const
 
void VWarning (const char *format, fmt::format_args args) const
 
void VInfo (const char *format, fmt::format_args args) const
 
void VDebug (const char *format, fmt::format_args args) const
 
template<typename... Args>
void Error (const char *format, const Args &... args) const
 
template<typename... Args>
void Warning (const char *format, const Args &... args) const
 
template<typename... Args>
void Info (const char *format, const Args &... args) const
 
template<typename... Args>
void Debug (const char *format, const Args &... args) const
 

Static Public Member Functions

static Loggeri ()
 

Data Fields

VerbosityLevel verbosity_level_
 
std::function< void(const std::string &)> print_fcn_
 

Protected Member Functions

void ChangeConsoleColor (TextColor text_color, int highlight_text) const
 
void ResetConsoleColor () const
 
std::string ColorString (const std::string &text, TextColor text_color, int highlight_text) const
 Colorize and reset the color of a string, does not work on Windows. More...
 

Member Enumeration Documentation

◆ TextColor

Enumerator
Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 

Constructor & Destructor Documentation

◆ Logger() [1/2]

open3d::utility::Logger::Logger ( )
inline

◆ Logger() [2/2]

open3d::utility::Logger::Logger ( Logger const &  )
delete

Member Function Documentation

◆ ChangeConsoleColor()

void open3d::utility::Logger::ChangeConsoleColor ( TextColor  text_color,
int  highlight_text 
) const
protected

Internal function to change text color for the console Note there is no safety check for parameters.

Parameters
text_colorfrom 0 to 7, they are black, red, green, yellow, blue, magenta, cyan, white
highlight_textis 0 or 1

◆ ColorString()

std::string open3d::utility::Logger::ColorString ( const std::string &  text,
TextColor  text_color,
int  highlight_text 
) const
protected

Colorize and reset the color of a string, does not work on Windows.

◆ Debug()

template<typename... Args>
void open3d::utility::Logger::Debug ( const char *  format,
const Args &...  args 
) const
inline

◆ Error()

template<typename... Args>
void open3d::utility::Logger::Error ( const char *  format,
const Args &...  args 
) const
inline

◆ i()

static Logger& open3d::utility::Logger::i ( )
inlinestatic

◆ Info()

template<typename... Args>
void open3d::utility::Logger::Info ( const char *  format,
const Args &...  args 
) const
inline

◆ operator=()

void open3d::utility::Logger::operator= ( Logger const &  )
delete

◆ ResetConsoleColor()

void open3d::utility::Logger::ResetConsoleColor ( ) const
protected

◆ VDebug()

void open3d::utility::Logger::VDebug ( const char *  format,
fmt::format_args  args 
) const
inline

◆ VError()

void open3d::utility::Logger::VError ( const char *  format,
fmt::format_args  args 
) const
inline

◆ VInfo()

void open3d::utility::Logger::VInfo ( const char *  format,
fmt::format_args  args 
) const
inline

◆ VWarning()

void open3d::utility::Logger::VWarning ( const char *  format,
fmt::format_args  args 
) const
inline

◆ Warning()

template<typename... Args>
void open3d::utility::Logger::Warning ( const char *  format,
const Args &...  args 
) const
inline

Field Documentation

◆ print_fcn_

std::function<void(const std::string &)> open3d::utility::Logger::print_fcn_
Initial value:
=
[](const std::string &msg) { std::cout << msg << std::endl; }

◆ verbosity_level_

VerbosityLevel open3d::utility::Logger::verbosity_level_

The documentation for this class was generated from the following files: