From 2168b72401278a5a3705bee706f458a735a69da4 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 28 Mar 2016 16:07:47 +0100 Subject: [PATCH] Allow -info to enable INFO level logging. --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 19bbf79..1ef7a21 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) long expireTextTimer; SDL_Event event; - SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN); memset(&app, 0, sizeof(App)); memset(&dev, 0, sizeof(Dev)); @@ -173,6 +173,11 @@ static void handleArguments(int argc, char *argv[]) SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG); } + + if (strcmp(argv[i], "-info") == 0) + { + SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); + } } }