![]() |
SGCT master (487fac4)
Simple Graphics Cluster Toolkit
|
#include <sgct/log.h>
Public Types | |
| enum class | Level { Error = 3 , Warning = 2 , Info = 1 , Debug = 0 } |
| Different notify levels for messages. More... | |
Public Member Functions | |
| void | setNotifyLevel (Level nl) |
| Set the notify level for displaying messages. | |
| void | setShowTime (bool state) |
| Set whether time of day should be displayed with each print message. | |
| void | setShowLogLevel (bool state) |
| Sets whether the log level should be displayed with each print message. | |
| void | setLogToConsole (bool state) |
| Set if log to console should be enabled. | |
| void | setLogCallback (std::function< void(Level, std::string_view)> fn) |
| Set the callback that gets invoked for each log. | |
Static Public Member Functions | |
| static Log & | instance () |
| static void | destroy () |
| static void | Debug (std::string_view message) |
| static void | Warning (std::string_view message) |
| static void | Info (std::string_view message) |
| static void | Error (std::string_view message) |
|
strong |
|
static |
|
static |
|
static |
|
static |
|
static |
| void sgct::Log::setLogCallback | ( | std::function< void(Level, std::string_view)> | fn | ) |
Set the callback that gets invoked for each log.
If you want to disable logging to the callback, pass a null function as a parameter.
| void sgct::Log::setLogToConsole | ( | bool | state | ) |
Set if log to console should be enabled.
It is enabled on default.
| void sgct::Log::setNotifyLevel | ( | Level | nl | ) |
Set the notify level for displaying messages.
| void sgct::Log::setShowLogLevel | ( | bool | state | ) |
Sets whether the log level should be displayed with each print message.
| void sgct::Log::setShowTime | ( | bool | state | ) |
Set whether time of day should be displayed with each print message.
|
static |