|
VaneDB 0.1.0
Embeddable vector database for edge AI
|
Enumerations | |
| enum class | Level { TRACE = 0 , DEBUG = 1 , INFO = 2 , WARN = 3 , ERROR = 4 , OFF = 5 } |
| Log level enumeration. More... | |
Functions | |
| const char * | level_to_string (Level level) |
| Convert log level to string. | |
| Level & | global_level () |
| Global log level (can be changed at runtime). | |
| void | set_level (Level level) |
| Set the global log level. | |
| Level | get_level () |
| Get the global log level. | |
| std::mutex & | log_mutex () |
| Mutex for thread-safe logging. | |
| template<typename T > | |
| void | format_kv (std::ostringstream &ss, const char *key, const T &value) |
| Format a single key-value pair. | |
| void | format_kvs (std::ostringstream &) |
| Format key-value pairs (base case). | |
| template<typename V , typename... Args> | |
| void | format_kvs (std::ostringstream &ss, const char *key, const V &value, Args &&... args) |
| Format key-value pairs (recursive case). | |
| template<typename... Args> | |
| void | log (Level level, const char *file, int line, const char *message, Args &&... args) |
| Core logging function. | |
|
strong |
|
inline |
Format a single key-value pair.
Definition at line 103 of file logging.h.
Referenced by format_kvs().
|
inline |
Format key-value pairs (base case).
Definition at line 110 of file logging.h.
Referenced by format_kvs(), and log().
|
inline |
Format key-value pairs (recursive case).
Definition at line 116 of file logging.h.
References format_kv(), and format_kvs().
|
inline |
|
inline |
Global log level (can be changed at runtime).
Definition at line 61 of file logging.h.
References DEBUG, ERROR, INFO, TRACE, and WARN.
Referenced by get_level(), log(), and set_level().
|
inline |
|
inline |
Core logging function.
Definition at line 125 of file logging.h.
References format_kvs(), global_level(), level_to_string(), and log_mutex().
|
inline |
|
inline |