|
libtcod
|
Internal libtcod logging module. More...
Go to the source code of this file.
Classes | |
| struct | TCOD_LogMessage |
| Information being logged, this is a temporary object which doesn't last longer than the logging callbacks. More... | |
Macros | |
| #define | TCOD_log_debug_f(fmt, ...) |
| #define | TCOD_log_info_f(fmt, ...) |
| #define | TCOD_log_warning_f(fmt, ...) |
| #define | TCOD_log_error_f(fmt, ...) |
| #define | TCOD_log_critical_f(fmt, ...) |
| #define | TCOD_log_debug(msg) |
| #define | TCOD_log_info(msg) |
| #define | TCOD_log_warning(msg) |
| #define | TCOD_log_error(msg) |
| #define | TCOD_log_critical(msg) |
Typedefs | |
| typedef enum TCOD_LogLevel | TCOD_LogLevel |
| typedef struct TCOD_LogMessage | TCOD_LogMessage |
| Information being logged, this is a temporary object which doesn't last longer than the logging callbacks. | |
| typedef void(* | TCOD_LoggingCallback) (const TCOD_LogMessage *message, void *userdata) |
| A callback for logger listeners. | |
Enumerations | |
| enum | TCOD_LogLevel { TCOD_LOG_DEBUG = 10 , TCOD_LOG_INFO = 20 , TCOD_LOG_WARNING = 30 , TCOD_LOG_ERROR = 40 , TCOD_LOG_CRITICAL = 50 } |
Functions | |
| void | TCOD_set_log_level (int level) |
| Set the level of messages being logged. | |
| void | TCOD_set_log_callback (TCOD_LoggingCallback callback, void *userdata) |
| Sets a callback for libtcod's logged output. | |
Internal libtcod logging module.
| #define TCOD_log_critical | ( | msg | ) |
| #define TCOD_log_critical_f | ( | fmt, | |
| ... ) |
| #define TCOD_log_debug | ( | msg | ) |
| #define TCOD_log_debug_f | ( | fmt, | |
| ... ) |
| #define TCOD_log_error | ( | msg | ) |
| #define TCOD_log_error_f | ( | fmt, | |
| ... ) |
| #define TCOD_log_info | ( | msg | ) |
| #define TCOD_log_info_f | ( | fmt, | |
| ... ) |
| #define TCOD_log_warning | ( | msg | ) |
| #define TCOD_log_warning_f | ( | fmt, | |
| ... ) |
| typedef struct TCOD_LogMessage TCOD_LogMessage |
Information being logged, this is a temporary object which doesn't last longer than the logging callbacks.
This struct will not contain NULL character pointers.
embed:rst:leading-asterisk .. versionadded:: 1.19
| void TCOD_set_log_callback | ( | TCOD_LoggingCallback | callback, |
| void * | userdata ) |
Sets a callback for libtcod's logged output.
| callback | A TCOD_LoggingCallback function which processes TCOD_LogMessage* parameters. Can be NULL to disable logging. |
| userdata | Userdata to be passed to the log function. |
embed:rst:leading-asterisk .. versionadded:: 1.19
| void TCOD_set_log_level | ( | int | level | ) |
Set the level of messages being logged.
| level | Should be one of the levels from TCOD_LogLevel. |
embed:rst:leading-asterisk .. versionadded:: 1.19