31 using Callback = void (*)(
LogLevel, std::string);
34 static std::atomic<Callback> custom_log_cb;
35 static void ffi_shimmed_cb(CLogLevel_t c_log_level,
char *c_msg);
38 static void e(std::string
const &message);
39 static void w(std::string
const &message);
40 static void i(std::string
const &message);
41 static void d(std::string
const &message);
42 static void v(std::string
const &message);
44 static void process_log_message(
LogLevel log_level,
45 std::string
const &message);
Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure.
Definition Log.hpp:29
static void set_minimum_log_level(LogLevel log_level)
static void set_emoji_log_level_headings_enabled(bool enabled)
static std::future< uint64_t > export_to_file(std::string const &file_path)
Exports collected logs to a compressed and JSON-encoded file on the local file system.
static void disable_log_file()
Disables logging to the previously set log file.
static bool get_emoji_log_level_headings_enabled()
static void set_custom_log_cb(Callback log_cb)
Registers a callback for a fully customizable way of handling log "events" from the logger (on top of...
static void set_log_file(std::string const &log_file_path)
Registers a file path where logs will be written to, whenever Ditto wants to issue a log (on top of e...
static LogLevel get_minimum_log_level()
static bool get_logging_enabled()
static void set_logging_enabled(bool enabled)
Namespace for the Ditto C++ SDK types and functions.
Definition AbstractDocumentPath.hpp:19
LogLevel
The log levels that the Ditto SDK supports.
Definition LogLevel.hpp:9