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:
@@ -7,18 +7,18 @@
|
||||
TCPsocket server_socket_accept(TCPsocket server_socket, Uint32 timeout_ms) {
|
||||
SDLNet_SocketSet set = SDLNet_AllocSocketSet(1);
|
||||
if (!set) {
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not allocate socket set");
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not allocate socket set");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (SDLNet_TCP_AddSocket(set, server_socket) == -1) {
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_SYSTEM, "Could not add socket to set");
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_APPLICATION, "Could not add socket to set");
|
||||
SDLNet_FreeSocketSet(set);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (SDLNet_CheckSockets(set, timeout_ms) != 1) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_SYSTEM, "No connection to accept");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No connection to accept");
|
||||
SDLNet_FreeSocketSet(set);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user