cyborg::Logger
class provides thread-safe logging capabilities for CyborgDB C++ operations. It follows a singleton pattern, allowing you to configure and access the same logger instance across your application.
Parameter | Type | Default | Description |
---|---|---|---|
level | LogLevel | - | Log level enum value: LogLevel::Debug , LogLevel::Info , LogLevel::Warning , LogLevel::Error , or LogLevel::Critical . |
to_file | bool | - | Whether to write logs to a file instead of stdout/stderr. |
file_path | const std::string& | "" | (Optional) Path to the log file. Only used when to_file is true . |
std::cerr
.Debug
level is only available in debug builds of the library (compiled with the DEBUG flag).