Commit 0b70c7e1 authored by feng@chromium.org's avatar feng@chromium.org

Hook up the log facility of Android platform.

Review URL: http://codereview.chromium.org/155443

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2447 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5c909390
......@@ -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::Print(const char* format, ...) {
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::PrintError(const char* format, ...) {
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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment