Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(942)

Unified Diff: src/platform-posix.cc

Issue 155443: Hook up the log facility of Android platform. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
===================================================================
--- src/platform-posix.cc (revision 2446)
+++ src/platform-posix.cc (working copy)
@@ -42,11 +42,15 @@
#include <netinet/in.h>
#include <netdb.h>
+#if defined(ANDROID)
+#define LOG_TAG "v8"
+#include <utils/Log.h> // LOG_PRI_VA
+#endif
+
#include "v8.h"
#include "platform.h"
-
namespace v8 {
namespace internal {
@@ -126,7 +130,11 @@
void OS::VPrint(const char* format, va_list args) {
+#if defined(ANDROID)
+ LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, format, args);
+#else
vprintf(format, args);
+#endif
}
@@ -139,7 +147,11 @@
void OS::VPrintError(const char* format, va_list args) {
+#if defined(ANDROID)
+ LOG_PRI_VA(ANDROID_LOG_ERROR, LOG_TAG, format, args);
+#else
vfprintf(stderr, format, args);
+#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698