From 04678ce66baa7965faecb51807145d8733845fa3 Mon Sep 17 00:00:00 2001 From: Ian Fischer Date: Tue, 21 Jul 2015 15:14:26 -0700 Subject: [PATCH] Make Dart |print| calls show up when running on Mac and iOS. --- sky/engine/bindings/builtin_natives.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sky/engine/bindings/builtin_natives.cc b/sky/engine/bindings/builtin_natives.cc index 476a23fc340..8ebd7b718f6 100644 --- a/sky/engine/bindings/builtin_natives.cc +++ b/sky/engine/bindings/builtin_natives.cc @@ -30,6 +30,10 @@ #include #endif +#if __APPLE__ +#include +#endif + namespace blink { #define REGISTER_FUNCTION(name, count) \ @@ -170,6 +174,8 @@ void Logger_PrintString(Dart_NativeArguments args) { // In addition to writing to the stdout, write to the logcat so that the // message is discoverable when running on an unrooted device. __android_log_print(ANDROID_LOG_INFO, "sky", "%.*s", length, chars); +#elif __APPLE__ + syslog(LOG_WARNING, "sky: %.*s", (int)length, chars); #endif } }