Mesa (main): mesa/main, android: Log errors to logcat

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 21:48:18 UTC 2021


Module: Mesa
Branch: main
Commit: 6138b047e294db910d16da63e2e7280e55823899
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6138b047e294db910d16da63e2e7280e55823899

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Thu Jul 29 10:09:32 2021 -0700

mesa/main, android: Log errors to logcat

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13532>

---

 src/mesa/main/errors.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index a4029c0896c..bbdfd62a0fa 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -35,7 +35,11 @@
 
 #include "context.h"
 #include "debug_output.h"
+#include "detect_os.h"
 
+#if DETECT_OS_ANDROID
+#  include <log/log.h>
+#endif
 
 static FILE *LogFile = NULL;
 
@@ -93,6 +97,10 @@ output_if_debug(const char *prefixString, const char *outputString,
          OutputDebugStringA(buf);
       }
 #endif
+
+#if DETECT_OS_ANDROID
+      LOG_PRI(ANDROID_LOG_ERROR, prefixString ? prefixString : "MESA", "%s%s", outputString, newline ? "\n" : "");
+#endif
    }
 }
 



More information about the mesa-commit mailing list