Remove LOGC()
It is not clear when to use LOGC() rather than LOGE(). Always use LOGE(). Moreover, enum sc_log_level has no "critical" log level.
This commit is contained in:
@@ -15,10 +15,9 @@
|
||||
#define LOGI(...) SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
|
||||
#define LOGW(...) SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
|
||||
#define LOGE(...) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
|
||||
#define LOGC(...) SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
|
||||
|
||||
#define LOG_OOM() \
|
||||
LOGC("OOM: %s:%d %s()", __FILE__, __LINE__, __func__)
|
||||
LOGE("OOM: %s:%d %s()", __FILE__, __LINE__, __func__)
|
||||
|
||||
void
|
||||
sc_set_log_level(enum sc_log_level level);
|
||||
|
||||
@@ -33,7 +33,7 @@ net_init(void) {
|
||||
WSADATA wsa;
|
||||
int res = WSAStartup(MAKEWORD(2, 2), &wsa) < 0;
|
||||
if (res < 0) {
|
||||
LOGC("WSAStartup failed with error %d", res);
|
||||
LOGE("WSAStartup failed with error %d", res);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@ sc_mutex_lock(sc_mutex *mutex) {
|
||||
int r = SDL_LockMutex(mutex->mutex);
|
||||
#ifndef NDEBUG
|
||||
if (r) {
|
||||
LOGC("Could not lock mutex: %s", SDL_GetError());
|
||||
LOGE("Could not lock mutex: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ sc_mutex_unlock(sc_mutex *mutex) {
|
||||
int r = SDL_UnlockMutex(mutex->mutex);
|
||||
#ifndef NDEBUG
|
||||
if (r) {
|
||||
LOGC("Could not lock mutex: %s", SDL_GetError());
|
||||
LOGE("Could not lock mutex: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
#else
|
||||
@@ -118,7 +118,7 @@ sc_cond_wait(sc_cond *cond, sc_mutex *mutex) {
|
||||
int r = SDL_CondWait(cond->cond, mutex->mutex);
|
||||
#ifndef NDEBUG
|
||||
if (r) {
|
||||
LOGC("Could not wait on condition: %s", SDL_GetError());
|
||||
LOGE("Could not wait on condition: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ sc_cond_timedwait(sc_cond *cond, sc_mutex *mutex, sc_tick deadline) {
|
||||
int r = SDL_CondWaitTimeout(cond->cond, mutex->mutex, ms);
|
||||
#ifndef NDEBUG
|
||||
if (r < 0) {
|
||||
LOGC("Could not wait on condition with timeout: %s", SDL_GetError());
|
||||
LOGE("Could not wait on condition with timeout: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ sc_cond_signal(sc_cond *cond) {
|
||||
int r = SDL_CondSignal(cond->cond);
|
||||
#ifndef NDEBUG
|
||||
if (r) {
|
||||
LOGC("Could not signal a condition: %s", SDL_GetError());
|
||||
LOGE("Could not signal a condition: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
#else
|
||||
@@ -169,7 +169,7 @@ sc_cond_broadcast(sc_cond *cond) {
|
||||
int r = SDL_CondBroadcast(cond->cond);
|
||||
#ifndef NDEBUG
|
||||
if (r) {
|
||||
LOGC("Could not broadcast a condition: %s", SDL_GetError());
|
||||
LOGE("Could not broadcast a condition: %s", SDL_GetError());
|
||||
abort();
|
||||
}
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user