Author: [email protected]
Date: Mon Jul 13 14:22:50 2009
New Revision: 2447
Modified:
branches/bleeding_edge/src/platform-posix.cc
Log:
Hook up the log facility of Android platform.
Review URL: http://codereview.chromium.org/155443
Modified: branches/bleeding_edge/src/platform-posix.cc
==============================================================================
--- branches/bleeding_edge/src/platform-posix.cc (original)
+++ branches/bleeding_edge/src/platform-posix.cc Mon Jul 13 14:22:50 2009
@@ -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
}
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---