Be more consistent about log levels
LOG_ERROR should be used in places where though recoverable (or at least something that can be handled safely), was unexpected, and may affect the user/application. LOG_WARNING should be used in places where it's not entirely unexpected, is recoverable, and doesn't really affect the user/application.
This commit is contained in:
@@ -51,7 +51,7 @@ static LRESULT CALLBACK sceneProc(HWND hwnd, UINT message, WPARAM wParam,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void do_log(enum log_type type, const char *msg, va_list args)
|
||||
static void do_log(int log_level, const char *msg, va_list args)
|
||||
{
|
||||
char bla[4096];
|
||||
vsnprintf(bla, 4095, msg, args);
|
||||
@@ -59,7 +59,7 @@ static void do_log(enum log_type type, const char *msg, va_list args)
|
||||
OutputDebugStringA(bla);
|
||||
OutputDebugStringA("\n");
|
||||
|
||||
if (type >= LOG_WARNING)
|
||||
if (log_level <= LOG_WARNING)
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user