Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure.
More...
|
typedef void(* | Callback) (LogLevel, std::string) |
|
Main singleton (global instance) to tweak the behavior of Ditto's logging infrastructure.
◆ get_emoji_log_level_headings_enabled()
bool ditto::Log::get_emoji_log_level_headings_enabled |
( |
| ) |
|
|
static |
Get whether logging levels are signified using emoji headings.
◆ get_logging_enabled()
bool ditto::Log::get_logging_enabled |
( |
| ) |
|
|
static |
Get whether logging is enabled or not.
◆ get_minimum_log_level()
LogLevel ditto::Log::get_minimum_log_level |
( |
| ) |
|
|
static |
Get the minimum log level at which logging should be occurring.
◆ set_custom_log_cb()
void ditto::Log::set_custom_log_cb |
( |
Log::Callback |
log_cb | ) |
|
|
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).
- Parameters
-
[in] | log_cb | a callback that is called each time a log statement is issued by Ditto (after filtering by log level). |
◆ set_emoji_log_level_headings_enabled()
void ditto::Log::set_emoji_log_level_headings_enabled |
( |
bool |
enabled | ) |
|
|
static |
Set whether logging levels are signified using emoji headings.
- Parameters
-
[in] | enabled | a bool representing whether logging levels are to be signified using emoji headings. |
◆ set_log_file()
void ditto::Log::set_log_file |
( |
std::string const & |
log_file_path | ) |
|
|
static |
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).
- Parameters
-
[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_logging_enabled()
void ditto::Log::set_logging_enabled |
( |
bool |
enabled | ) |
|
|
static |
Set whether Ditto logging is enabled or not.
- Parameters
-
[in] | enabled | a bool representing whether logging should be enabled or not. |
◆ set_minimum_log_level()
void ditto::Log::set_minimum_log_level |
( |
LogLevel |
log_level | ) |
|
|
static |
Set the minimum log level at which logging should be occurring.
- Parameters
-
[in] | log_level | the minimum logging level at which logging should be occurring. |