Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagn@cs.stanford.edu>2017-09-25 02:13:45 +0300
committerRich Trott <rtrott@gmail.com>2019-12-12 17:10:13 +0300
commit73df09e66bb54764817de3f87154bdbc8e391a23 (patch)
treed430ffefdae1d0b627117bd40aa9857146f1580f /src
parent99fe9dd11225daf238c72978198237dcdc0b22bc (diff)
build: on Android, use android log library to print stack traces
And other errors like lost promises PR-URL: https://github.com/nodejs/node/pull/29388 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Christian Clauss <cclauss@me.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_errors.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 17c1bd7f55c..9474fbb1131 100644
--- a/src/node_errors.cc
+++ b/src/node_errors.cc
@@ -10,6 +10,10 @@
#include "node_v8_platform-inl.h"
#include "util-inl.h"
+#ifdef __ANDROID__
+#include <android/log.h>
+#endif
+
namespace node {
using errors::TryCatchScope;
@@ -429,6 +433,8 @@ void PrintErrorString(const char* format, ...) {
// Don't include the null character in the output
CHECK_GT(n, 0);
WriteConsoleW(stderr_handle, wbuf.data(), n - 1, nullptr, nullptr);
+#elif defined(__ANDROID__)
+ __android_log_vprint(ANDROID_LOG_ERROR, "nodejs", format, ap);
#else
vfprintf(stderr, format, ap);
#endif