Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit add17b1

Browse filesBrowse files
gcampaxtargos
authored andcommitted
build: on Android, use android log library to print stack traces
And other errors like lost promises PR-URL: #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>
1 parent 65e67cb commit add17b1
Copy full SHA for add17b1

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎src/node_errors.cc‎

Copy file name to clipboardExpand all lines: src/node_errors.cc
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include "node_v8_platform-inl.h"
1111
#include "util-inl.h"
1212

13+
#ifdef __ANDROID__
14+
#include <android/log.h>
15+
#endif
16+
1317
namespace node {
1418

1519
using errors::TryCatchScope;
@@ -426,6 +430,8 @@ void PrintErrorString(const char* format, ...) {
426430
// Don't include the null character in the output
427431
CHECK_GT(n, 0);
428432
WriteConsoleW(stderr_handle, wbuf.data(), n - 1, nullptr, nullptr);
433+
#elif defined(__ANDROID__)
434+
__android_log_vprint(ANDROID_LOG_ERROR, "nodejs", format, ap);
429435
#else
430436
vfprintf(stderr, format, ap);
431437
#endif

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.