From: Holger Schemel Date: Wed, 16 Sep 2020 16:37:25 +0000 (+0200) Subject: added setting Android log level for new logging functions X-Git-Tag: 4.2.0.3~35 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e702d1812014b83e4a41c91c2d6a57f2b2f48e39;p=rocksndiamonds.git added setting Android log level for new logging functions --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 24b6d248..e3983f6d 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -293,6 +293,15 @@ static void Log(int log_level, char *mode, char *format, va_list ap) if (log_level < 0 || log_level > LOG_FATAL) return; +#if defined(PLATFORM_ANDROID) + android_log_prio = (log_level == LOG_DEBUG ? ANDROID_LOG_DEBUG : + log_level == LOG_INFO ? ANDROID_LOG_INFO : + log_level == LOG_WARN ? ANDROID_LOG_WARN : + log_level == LOG_ERROR ? ANDROID_LOG_ERROR : + log_level == LOG_FATAL ? ANDROID_LOG_FATAL : + ANDROID_LOG_UNKNOWN); +#endif + static boolean last_line_was_separator = FALSE; char *log_token = log_tokens[log_level];