Log with category APPLICATION

All our logs should use APPLICATION category. The logs for other
categories are not printed by default under the "critical" level.
This commit is contained in:
Romain Vimont
2018-02-12 16:06:53 +01:00
parent 598ddcbfbc
commit 6fe65d9f5c
9 changed files with 34 additions and 34 deletions

View File

@@ -4,28 +4,28 @@
void mutex_lock(SDL_mutex *mutex) {
if (SDL_LockMutex(mutex)) {
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not lock mutex");
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not lock mutex");
abort();
}
}
void mutex_unlock(SDL_mutex *mutex) {
if (SDL_UnlockMutex(mutex)) {
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not unlock mutex");
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not unlock mutex");
abort();
}
}
void cond_wait(SDL_cond *cond, SDL_mutex *mutex) {
if (SDL_CondWait(cond, mutex)) {
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not wait on condition");
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not wait on condition");
abort();
}
}
void cond_signal(SDL_cond *cond) {
if (SDL_CondSignal(cond)) {
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not signal a condition");
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not signal a condition");
abort();
}
}