summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-10-26 17:57:17 +0100
committerSteve Block <steveblock@google.com>2011-10-28 14:57:42 +0100
commitd50dcb1111b9599889cff6c3b4a112e5dfa3ce59 (patch)
tree0289a5bc0fff7d16c8fd4b22f9243a0ebe40fc0b /Source/JavaScriptCore
parent39ef870949ce97df4abfe4febd0b38b312c85007 (diff)
downloadexternal_webkit-d50dcb1111b9599889cff6c3b4a112e5dfa3ce59.zip
external_webkit-d50dcb1111b9599889cff6c3b4a112e5dfa3ce59.tar.gz
external_webkit-d50dcb1111b9599889cff6c3b4a112e5dfa3ce59.tar.bz2
Implement all WebKit logging functions on Android
Currently, all WebKit logging goes to stderr. This change hooks it up to logcat. We use a single log level (LOG_DEBUG) to avoid forking this code excessively. Note that logging is enabled only in debug builds, and we force LOG() and LOG_VERBOSE() to never be enabled. This will be changed in a future patch. Bug: 5448972 Change-Id: I8b056743ae09adc518658a639185c3983dd56573
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/wtf/Assertions.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/JavaScriptCore/wtf/Assertions.cpp b/Source/JavaScriptCore/wtf/Assertions.cpp
index 930368c..0642414 100644
--- a/Source/JavaScriptCore/wtf/Assertions.cpp
+++ b/Source/JavaScriptCore/wtf/Assertions.cpp
@@ -66,6 +66,10 @@
#include <execinfo.h>
#endif
+#if OS(ANDROID)
+#include <utils/Log.h>
+#endif
+
extern "C" {
#if PLATFORM(BREWMP)
@@ -124,7 +128,9 @@ static void vprintf_stderr_common(const char* format, va_list args)
vsnprintf(buffer.data(), size, format, args);
printLog(buffer);
}
-
+#elif OS(ANDROID)
+ LOG_PRI_VA(ANDROID_LOG_DEBUG, "WebKit", format, args);
+ return;
#elif HAVE(ISDEBUGGERPRESENT)
if (IsDebuggerPresent()) {
size_t size = 1024;