NVIDIA Holoscan SDK v1.0.3
v1.0.3

Class Logger

class Logger

A logger class that wraps spdlog.

Please see the spdlog documentation for more details of the API.

Public Static Functions

static void set_level(LogLevel level, bool *is_overridden_by_env = nullptr)

static LogLevel level()

static void set_pattern(std::string pattern = "", bool *is_overridden_by_env = nullptr)

static std::string &pattern()

static bool should_backtrace()

static void disable_backtrace()

static void enable_backtrace(size_t n_messages)

static void dump_backtrace()

static void flush()

static LogLevel flush_level()

static void flush_on(LogLevel level)

template<typename FormatT, typename ...ArgsT>
static inline void log(const char *file, int line, const char *function_name, LogLevel level, const FormatT &format, ArgsT&&... args)

template<typename FormatT, typename ...ArgsT>
static inline void log(LogLevel level, const FormatT &format, ArgsT&&... args)

Public Static Attributes

static bool log_pattern_set_by_user

Flag to indicate if the log pattern was set by the user.

static bool log_level_set_by_user

Flag to indicate if the log level was set by the user.

This is used to set the default log level (INFO) in Application::Application() if the user has not set the log level explicitly before Application::Application() is called and no environment variable (HOLOSCAN_LOG_LEVEL) is set.

Previous Class IOSpec
Next Class ManualClock
© Copyright 2022-2023, NVIDIA. Last updated on Apr 19, 2024.