Interface to interact with the mgba logger. More...
#include <stdbool.h>Go to the source code of this file.
Macros | |
| #define | MGBA_FATAL(...) ((void)0) |
| #define | MGBA_ERROR(...) ((void)0) |
| #define | MGBA_WARN(...) ((void)0) |
| #define | MGBA_INFO(...) ((void)0) |
| #define | MGBA_DEBUG(...) ((void)0) |
| #define | MGBA_FUNC_LOG(level, ...) ((void)0) |
| #define | MGBA_FUNC_FATAL(...) ((void)0) |
| #define | MGBA_FUNC_ERROR(...) ((void)0) |
| #define | MGBA_FUNC_WARN(...) ((void)0) |
| #define | MGBA_FUNC_INFO(...) ((void)0) |
| #define | MGBA_FUNC_DEBUG(...) ((void)0) |
Enumerations | |
| enum | MgbaLogLevel { MGBA_LOG_FATAL , MGBA_LOG_ERROR , MGBA_LOG_WARN , MGBA_LOG_INFO , MGBA_LOG_DEBUG } |
Functions | |
| bool | mgba_logger_init (void) |
| Initialize mgba logger. | |
| void | mgba_printf (MgbaLogLevel level, const char *fmt,...) |
| Print to mgba log with a format string. | |
| void | mgba_func_printf (MgbaLogLevel level, const char *func_name, const char *fmt,...) |
| Print to mgba log with a format string and function name. | |
Interface to interact with the mgba logger.
Use with mgba in the command line.
You can pass which logs you'd like to print with a flag passed to mgba with -l or --log-level.
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|
| / | / | / | DEBUG | INFO | WARN | ERROR | FATAL |
Definition in file mgba_logger.h.
| #define MGBA_DEBUG | ( | ... | ) | ((void)0) |
Definition at line 92 of file mgba_logger.h.
| #define MGBA_ERROR | ( | ... | ) | ((void)0) |
Definition at line 89 of file mgba_logger.h.
| #define MGBA_FATAL | ( | ... | ) | ((void)0) |
Definition at line 88 of file mgba_logger.h.
| #define MGBA_FUNC_DEBUG | ( | ... | ) | ((void)0) |
Definition at line 100 of file mgba_logger.h.
| #define MGBA_FUNC_ERROR | ( | ... | ) | ((void)0) |
Definition at line 97 of file mgba_logger.h.
| #define MGBA_FUNC_FATAL | ( | ... | ) | ((void)0) |
Definition at line 96 of file mgba_logger.h.
| #define MGBA_FUNC_INFO | ( | ... | ) | ((void)0) |
Definition at line 99 of file mgba_logger.h.
| #define MGBA_FUNC_LOG | ( | level, | |
| ... | |||
| ) | ((void)0) |
Definition at line 94 of file mgba_logger.h.
| #define MGBA_FUNC_WARN | ( | ... | ) | ((void)0) |
Definition at line 98 of file mgba_logger.h.
| #define MGBA_INFO | ( | ... | ) | ((void)0) |
Definition at line 91 of file mgba_logger.h.
| #define MGBA_WARN | ( | ... | ) | ((void)0) |
Definition at line 90 of file mgba_logger.h.
| enum MgbaLogLevel |
Definition at line 29 of file mgba_logger.h.
| void mgba_func_printf | ( | MgbaLogLevel | level, |
| const char * | func_name, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
Print to mgba log with a format string and function name.
| level | |
| func_name | Function name - prepended to the log string "<func_name>(): <log_string>" |
| fmt | Format string |
| ... | variadic arguments |
Definition at line 78 of file mgba_logger.c.
| bool mgba_logger_init | ( | void | ) |
Initialize mgba logger.
Checks that the logger is available by checking the expected registers magic number
Definition at line 69 of file mgba_logger.c.
| void mgba_printf | ( | MgbaLogLevel | level, |
| const char * | fmt, | ||
| ... | |||
| ) |
Print to mgba log with a format string.
| level | |
| fmt | Format string |
| ... | variadic arguments |
Definition at line 74 of file mgba_logger.c.