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
This commit is contained in:
parent
5c909390dd
commit
0b70c7e16e
@ -42,11 +42,15 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
|
||||||
|
#if defined(ANDROID)
|
||||||
|
#define LOG_TAG "v8"
|
||||||
|
#include <utils/Log.h> // LOG_PRI_VA
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "v8.h"
|
#include "v8.h"
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
@ -126,7 +130,11 @@ void OS::Print(const char* format, ...) {
|
|||||||
|
|
||||||
|
|
||||||
void OS::VPrint(const char* format, va_list args) {
|
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);
|
vprintf(format, args);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -139,7 +147,11 @@ void OS::PrintError(const char* format, ...) {
|
|||||||
|
|
||||||
|
|
||||||
void OS::VPrintError(const char* format, va_list args) {
|
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);
|
vfprintf(stderr, format, args);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user