15 #if defined(__CUDACC__) && defined(_MSC_VER) && __CUDACC_VER_MAJOR__ < 11
16 #ifndef FMT_DEPRECATED
17 #define FMT_DEPRECATED
22 #include <fmt/printf.h>
23 #include <fmt/ranges.h>
25 #define DEFAULT_IO_BUFFER_SIZE 1024
48 #define LogError(...) \
49 Logger::LogError_(__FILE__, __LINE__, \
50 static_cast<const char *>(OPEN3D_FUNCTION), __VA_ARGS__)
60 #define LogWarning(...) \
61 Logger::LogWarning_(__FILE__, __LINE__, \
62 static_cast<const char *>(OPEN3D_FUNCTION), \
70 #define LogInfo(...) \
71 Logger::LogInfo_(__FILE__, __LINE__, \
72 static_cast<const char *>(OPEN3D_FUNCTION), __VA_ARGS__)
79 #define LogDebug(...) \
80 Logger::LogDebug_(__FILE__, __LINE__, \
81 static_cast<const char *>(OPEN3D_FUNCTION), __VA_ARGS__)
138 template <
typename... Args>
141 const char *
function,
144 if (
sizeof...(Args) > 0) {
146 file, line,
function,
147 FormatArgs(
format, fmt::make_format_args(args...)));
153 template <
typename... Args>
156 const char *
function,
161 if (
sizeof...(Args) > 0) {
163 file, line,
function,
164 FormatArgs(
format, fmt::make_format_args(args...)));
171 template <
typename... Args>
174 const char *
function,
178 if (
sizeof...(Args) > 0) {
180 file, line,
function,
181 FormatArgs(
format, fmt::make_format_args(args...)));
188 template <
typename... Args>
191 const char *
function,
196 if (
sizeof...(Args) > 0) {
198 file, line,
function,
199 FormatArgs(
format, fmt::make_format_args(args...)));
209 static std::string FormatArgs(
const char *
format, fmt::format_args args) {
210 std::string err_msg = fmt::vformat(
format, args);
213 void VError [[noreturn]] (
const char *file,
215 const char *
function,
216 const std::string &message)
const;
217 void VWarning(
const char *file,
219 const char *
function,
220 const std::string &message)
const;
221 void VInfo(
const char *file,
223 const char *
function,
224 const std::string &message)
const;
225 void VDebug(
const char *file,
227 const char *
function,
228 const std::string &message)
const;
232 std::unique_ptr<Impl> impl_;
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:195
Logger class should be used as a global singleton object (GetInstance()).
Definition: Logging.h:107
Logger(Logger const &)=delete
void operator=(Logger const &)=delete
const std::function< void(const std::string &)> GetPrintFunction()
Get the print function used by the Logger.
Definition: Logging.cpp:116
VerbosityLevel GetVerbosityLevel() const
Get global verbosity level of Open3D.
Definition: Logging.cpp:128
void ResetPrintFunction()
Reset the print function to the default one (print to console).
Definition: Logging.cpp:120
void SetPrintFunction(std::function< void(const std::string &)> print_fcn)
Definition: Logging.cpp:111
static void LogError_(const char *file, int line, const char *function, const char *format, Args &&... args)
Definition: Logging.h:139
static void LogWarning_(const char *file, int line, const char *function, const char *format, Args &&... args)
Definition: Logging.h:154
static void LogDebug_(const char *file, int line, const char *function, const char *format, Args &&... args)
Definition: Logging.h:189
static void LogInfo_(const char *file, int line, const char *function, const char *format, Args &&... args)
Definition: Logging.h:172
void SetVerbosityLevel(VerbosityLevel verbosity_level)
Definition: Logging.cpp:124
static Logger & GetInstance()
Get Logger global singleton instance.
Definition: Logging.cpp:68
Definition: Logging.h:244
void Exit()
Definition: Logging.h:253
VerbosityContextManager(VerbosityLevel level)
Definition: Logging.h:246
void Enter()
Definition: Logging.h:248
const char const char value recording_handle imu_sample void
Definition: K4aPlugin.cpp:250
void SetVerbosityLevel(VerbosityLevel level)
Definition: Logging.cpp:132
VerbosityLevel
Definition: Logging.h:86
VerbosityLevel GetVerbosityLevel()
Get global verbosity level of Open3D.
Definition: Logging.cpp:136
Definition: PinholeCameraIntrinsic.cpp:16