mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
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>
This commit is contained in:
parent
99fe9dd112
commit
73df09e66b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user