Ditto 4.6.0
|
Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure. More...
#include <Log.hpp>
Public Types | |
typedef void(* | Callback) (LogLevel, std::string) |
Static Public Member Functions | |
static void | e (std::string const &message) |
static void | w (std::string const &message) |
static void | i (std::string const &message) |
static void | d (std::string const &message) |
static void | v (std::string const &message) |
static void | process_log_message (LogLevel log_level, std::string const &message) |
static bool | get_logging_enabled () |
static void | set_logging_enabled (bool enabled) |
static bool | get_emoji_log_level_headings_enabled () |
static void | set_emoji_log_level_headings_enabled (bool enabled) |
static LogLevel | get_minimum_log_level () |
static void | set_minimum_log_level (LogLevel log_level) |
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 emitting the log to the console). | |
static void | disable_log_file () |
Disables logging to the previously set log file. | |
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 logging to the console, and to a file, if any). | |
Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure.
|
static |
Get whether logging levels are signified using emoji headings.
|
static |
Get whether logging is enabled or not.
|
static |
Get the minimum log level at which logging should be occurring.
|
static |
Registers a callback for a fully customizable way of handling log "events" from the logger (on top of logging to the console, and to a file, if any).
[in] | log_cb | a callback that is called each time a log statement is issued by Ditto (after filtering by log level). |
Set whether logging levels are signified using emoji headings.
[in] | enabled | a bool representing whether logging levels are to be signified using emoji headings. |
Registers a file path where logs will be written to, whenever Ditto wants to issue a log (on top of emitting the log to the console).
[in] | log_file_path | the file path to be used to write logs at (the file path must be within an already existing directory). |
Set whether Ditto logging is enabled or not.
[in] | enabled | a bool representing whether logging should be enabled or not. |
|
static |
Set the minimum log level at which logging should be occurring.
[in] | log_level | the minimum logging level at which logging should be occurring. |