summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorWuZhen <wuzhen@jidemail.com>2016-01-20 15:52:29 +0800
committerMauro Rossi <issor.oruam@gmail.com>2016-11-01 20:41:59 +0100
commit8fc46649adfa99b1f316bd34555a0ac8dd99737d (patch)
tree47d3e054a4255296d93c17e49677fe53d9b6bddb /src/mesa
parent34763549cd7de147951744d9f389b4ed5c6d686e (diff)
downloadexternal_mesa3d-8fc46649adfa99b1f316bd34555a0ac8dd99737d.zip
external_mesa3d-8fc46649adfa99b1f316bd34555a0ac8dd99737d.tar.gz
external_mesa3d-8fc46649adfa99b1f316bd34555a0ac8dd99737d.tar.bz2
android: print debug info to logcat
Redirect logs printed to stderr to logcat. NO_REF_TASK Tested: local run Change-Id: I58e3966a608af361b86c54b4c95a92561b711968 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/errors.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 9932b4a..53a8436 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -42,6 +42,10 @@
#include "util/hash_table.h"
#include "util/simple_list.h"
+#if defined(ANDROID)
+# define LOG_TAG "mesa"
+# include <log/log.h>
+#endif
static FILE *LogFile = NULL;
@@ -95,6 +99,10 @@ output_if_debug(const char *prefixString, const char *outputString,
_mesa_snprintf(buf, sizeof(buf), "%s: %s%s", prefixString, outputString, newline ? "\n" : "");
OutputDebugStringA(buf);
}
+#elif defined(ANDROID)
+ {
+ ALOGD("%s: %s", prefixString, outputString);
+ }
#endif
}
}