mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 04:21:42 +00:00
Add LOG_WARNING() debug log macro
This commit is contained in:
parent
b671458f81
commit
11b54313c5
3 changed files with 8 additions and 3 deletions
|
|
@ -158,6 +158,7 @@ bool configCameraToxicGas = true;
|
|||
bool configLuaProfiler = false;
|
||||
bool configDebugPrint = false;
|
||||
bool configDebugInfo = false;
|
||||
bool configDebugWarning = false;
|
||||
bool configDebugError = false;
|
||||
#ifdef DEVELOPMENT
|
||||
bool configCtxProfiler = false;
|
||||
|
|
@ -310,6 +311,7 @@ static const struct ConfigOption options[] = {
|
|||
{.name = "lua_profiler", .type = CONFIG_TYPE_BOOL, .boolValue = &configLuaProfiler},
|
||||
{.name = "debug_print", .type = CONFIG_TYPE_BOOL, .boolValue = &configDebugPrint},
|
||||
{.name = "debug_info", .type = CONFIG_TYPE_BOOL, .boolValue = &configDebugInfo},
|
||||
{.name = "debug_warning", .type = CONFIG_TYPE_BOOL, .boolValue = &configDebugWarning},
|
||||
{.name = "debug_error", .type = CONFIG_TYPE_BOOL, .boolValue = &configDebugError},
|
||||
#ifdef DEVELOPMENT
|
||||
{.name = "ctx_profiler", .type = CONFIG_TYPE_BOOL, .boolValue = &configCtxProfiler},
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ extern bool configCameraToxicGas;
|
|||
extern bool configLuaProfiler;
|
||||
extern bool configDebugPrint;
|
||||
extern bool configDebugInfo;
|
||||
extern bool configDebugWarning;
|
||||
extern bool configDebugError;
|
||||
#ifdef DEVELOPMENT
|
||||
extern bool configCtxProfiler;
|
||||
|
|
|
|||
|
|
@ -46,11 +46,13 @@ static void _debuglog_print_log(const char* logType, char* filename) {
|
|||
#if defined(DISABLE_MODULE_LOG)
|
||||
#define LOG_DEBUG(...)
|
||||
#define LOG_INFO(...)
|
||||
#define LOG_WARNING(...)
|
||||
#define LOG_ERROR(...)
|
||||
#else
|
||||
#define LOG_DEBUG(...) (configDebugPrint ? ( _debuglog_print_log("DEBUG", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_INFO(...) ((configDebugInfo || gCLIOpts.headless) ? ( _debuglog_print_log("INFO", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_ERROR(...) (configDebugError ? ( _debuglog_print_log("ERROR", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_DEBUG(...) (configDebugPrint ? ( _debuglog_print_log("DEBUG", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_INFO(...) ((configDebugInfo || gCLIOpts.headless) ? ( _debuglog_print_log("INFO", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_WARNING(...) (configDebugWarning ? ( _debuglog_print_log("WARNING", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#define LOG_ERROR(...) (configDebugError ? ( _debuglog_print_log("ERROR", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0)
|
||||
#endif
|
||||
#define LOG_CONSOLE(...) { snprintf(gDjuiConsoleTmpBuffer, CONSOLE_MAX_TMP_BUFFER, __VA_ARGS__), djui_console_message_create(gDjuiConsoleTmpBuffer, CONSOLE_MESSAGE_INFO); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue