From a391d50cc061b16bcae121a868e848f8ea7c65d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 1 Dec 2015 14:58:21 +0300 Subject: Add support for logging in nacl to console. --- src/localconsts.h | 3 +++ src/logger.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/localconsts.h b/src/localconsts.h index 628584a45..9367cb015 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -178,6 +178,9 @@ // Android logging // #define ANDROID_LOG 1 +// nacl logging +// #define NACL_LOG 1 + // profiler // #define USE_PROFILER 1 diff --git a/src/logger.cpp b/src/logger.cpp index 433713760..c1beca132 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -45,6 +45,9 @@ #define SPECIALLOG(x) __android_log_print(ANDROID_LOG_INFO, "manaplus", x); #define DSPECIALLOG(x) __android_log_print(ANDROID_LOG_VERBOSE, \ "manaplus", x); +#elif defined __native_client__ && defined(NACL_LOG) +#define SPECIALLOG(x) std::cerr << x; +#define DSPECIALLOG(x) std::cerr << x; #else #define SPECIALLOG(x) #define DSPECIALLOG(x) -- cgit v1.2.3-70-g09d2