31 typedef void (*Callback)(LogLevel, std::string);
34 static std::atomic<Callback> custom_log_cb;
35 static void ffi_shimmed_cb(CLogLevel_t c_log_level,
char const *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);
105 static void set_log_file(std::string
const &log_file_path);
165 static std::future<uint64_t>
export_to_file(std::string
const &file_path);
Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure.
Definition Log.hpp:29
static void disable_log_file()
Disables logging to the previously set log file.
Definition Log.cpp:86
static void set_logging_enabled(bool enabled)
Definition Log.cpp:66
static LogLevel get_minimum_log_level()
Definition Log.cpp:75
static void set_emoji_log_level_headings_enabled(bool enabled)
Definition Log.cpp:71
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.
Definition Log.cpp:133
static bool get_logging_enabled()
Definition Log.cpp:65
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...
Definition Log.cpp:82
static void set_minimum_log_level(LogLevel log_level)
Definition Log.cpp:78
static bool get_emoji_log_level_headings_enabled()
Definition Log.cpp:68
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...
Definition Log.cpp:99