Reviewers: Mads Ager,

Description:
Add a preprocessor symbol to have printing on Android use stdout instead of the
system log

This is convenient for debugging on Android as one don't have to go to the
system log for printf based debugging.

Please review this at http://codereview.chromium.org/6672041/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/platform-posix.cc


Index: src/platform-posix.cc
===================================================================
--- src/platform-posix.cc       (revision 7187)
+++ src/platform-posix.cc       (working copy)
@@ -139,7 +139,7 @@


 void OS::VPrint(const char* format, va_list args) {
-#if defined(ANDROID)
+#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
   LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, format, args);
 #else
   vprintf(format, args);
@@ -156,7 +156,7 @@


 void OS::VFPrint(FILE* out, const char* format, va_list args) {
-#if defined(ANDROID)
+#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
   LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, format, args);
 #else
   vfprintf(out, format, args);
@@ -173,7 +173,7 @@


 void OS::VPrintError(const char* format, va_list args) {
-#if defined(ANDROID)
+#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
   LOG_PRI_VA(ANDROID_LOG_ERROR, LOG_TAG, format, args);
 #else
   vfprintf(stderr, format, args);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to