|
Veethree D7 SDK
|
logging with module-based filtering
This class provides a logging system that:
#include <log.h>
Public Types | |
| using | log_func |
| Function type for logging operations. | |
Public Member Functions | |
| void | load_config_file (const std::string &path) |
| Load configuration from JSON file. | |
| void | load_config_json (const nlohmann::json &cfg) |
| Load configuration from JSON object. | |
| void | clear_config () |
| Remove the current configuration, disabling any logging. | |
| log (const log &)=delete | |
| log & | operator= (const log &)=delete |
| log (log &&)=delete | |
| log & | operator= (log &&)=delete |
Static Public Member Functions | |
| static log * | instance () |
| Get a pointer to the singleton instance. | |
| template<typename... Args> | |
| static void | logger (module module, spdlog::source_loc loc, spdlog::level::level_enum lvl, fmt::format_string< Args... > fmt, const Args &... args) |
| Templated wrapper for type-safe logging. | |
logging with module-based filtering
This class provides a logging system that:
Function type for logging operations.
Can be either an active logging function or an empty function based on module configuration and/or log level
| void vsdk::diag::log::load_config_file | ( | const std::string & | path | ) |
Load configuration from JSON file.
| path | Path to configuration file |
| void vsdk::diag::log::load_config_json | ( | const nlohmann::json & | cfg | ) |
Load configuration from JSON object.
| cfg | JSON object containing the configuration |
|
inlinestatic |
Templated wrapper for type-safe logging.
| module | The module generating the log |
| loc | Source location information |
| lvl | log level |
| fmt | Format string |
| args | Format arguments |