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:
jp9000
2014-02-28 20:02:29 -07:00
parent 4e10eeda09
commit 771eac6015
15 changed files with 120 additions and 91 deletions

View File

@@ -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();
}