![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Logger class should be used as a global singleton object (GetInstance()). More...
#include <Logging.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| Logger (Logger const &)=delete | |
| void | operator= (Logger const &)=delete |
| void | SetPrintFunction (std::function< void(const std::string &)> print_fcn) |
| void | ResetPrintFunction () |
| Reset the print function to the default one (print to console). More... | |
| const std::function< void(const std::string &)> | GetPrintFunction () |
| Get the print function used by the Logger. More... | |
| void | SetVerbosityLevel (VerbosityLevel verbosity_level) |
| VerbosityLevel | GetVerbosityLevel () const |
| Get global verbosity level of CloudViewer. More... | |
Static Public Member Functions | |
| static Logger & | GetInstance () |
| Get Logger global singleton instance. More... | |
| template<typename... Args> | |
| static void | LogError_ (const char *file, int line, const char *function, const char *format, Args &&...args) |
| template<typename... Args> | |
| static void | LogWarning_ (const char *file, int line, const char *function, const char *format, Args &&...args) |
| template<typename... Args> | |
| static void | LogInfo_ (const char *file, int line, const char *function, const char *format, Args &&...args) |
| template<typename... Args> | |
| static void | LogDebug_ (const char *file, int line, const char *function, const char *format, Args &&...args) |
Logger class should be used as a global singleton object (GetInstance()).
|
delete |
|
static |
Get Logger global singleton instance.
Definition at line 25 of file Logging.cpp.
Referenced by cloudViewer::utility::VerbosityContextManager::Enter(), cloudViewer::utility::VerbosityContextManager::Exit(), cloudViewer::core::Cacher::GetInstance(), cloudViewer::core::MemoryManagerStatistic::GetInstance(), LogDebug_(), LogError_(), LogInfo_(), LogWarning_(), cloudViewer::PYBIND11_MODULE(), cloudViewer::utility::pybind_logging(), cloudViewer::visualization::app::RunViewer(), and cloudViewer::core::MemoryManagerStatistic::~MemoryManagerStatistic().
| const std::function< void(const std::string &)> cloudViewer::utility::Logger::GetPrintFunction | ( | ) |
Get the print function used by the Logger.
Definition at line 73 of file Logging.cpp.
Referenced by cloudViewer::visualization::app::RunViewer().
| VerbosityLevel cloudViewer::utility::Logger::GetVerbosityLevel | ( | ) | const |
Get global verbosity level of CloudViewer.
Definition at line 85 of file Logging.cpp.
Referenced by cloudViewer::utility::VerbosityContextManager::Enter().
|
inlinestatic |
Definition at line 239 of file Logging.h.
References cloudViewer::utility::Debug, format, GetInstance(), and cloudViewer::utility::GetVerbosityLevel().
|
inlinestatic |
Definition at line 189 of file Logging.h.
References format, and GetInstance().
Referenced by cloudViewer::core::tensor_check::AssertTensorDevice_(), cloudViewer::core::tensor_check::AssertTensorDtype_(), cloudViewer::core::tensor_check::AssertTensorDtypes_(), and cloudViewer::core::tensor_check::AssertTensorShape_().
|
inlinestatic |
Definition at line 222 of file Logging.h.
References format, GetInstance(), cloudViewer::utility::GetVerbosityLevel(), and cloudViewer::utility::Info.
|
inlinestatic |
Definition at line 204 of file Logging.h.
References format, GetInstance(), cloudViewer::utility::GetVerbosityLevel(), and cloudViewer::utility::Warning.
|
delete |
| void cloudViewer::utility::Logger::ResetPrintFunction | ( | ) |
Reset the print function to the default one (print to console).
Definition at line 77 of file Logging.cpp.
Referenced by cloudViewer::utility::pybind_logging(), cloudViewer::visualization::app::RunViewer(), and cloudViewer::core::MemoryManagerStatistic::~MemoryManagerStatistic().
| void cloudViewer::utility::Logger::SetPrintFunction | ( | std::function< void(const std::string &)> | print_fcn | ) |
Overwrite the default print function, this is useful when you want to redirect prints rather than printing to stdout. For example, in Open3D's python binding, the default print function is replaced with py::print().
| print_fcn | The function for printing. It should take a string input and returns nothing. |
Definition at line 68 of file Logging.cpp.
Referenced by cloudViewer::PYBIND11_MODULE(), and cloudViewer::visualization::app::RunViewer().
| void cloudViewer::utility::Logger::SetVerbosityLevel | ( | VerbosityLevel | verbosity_level | ) |
Set global verbosity level of CloudViewer.
| verbosity_level | Messages with equal or less than verbosity_level verbosity will be printed. |
Definition at line 81 of file Logging.cpp.
Referenced by cloudViewer::utility::VerbosityContextManager::Enter(), and cloudViewer::utility::VerbosityContextManager::Exit().