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 } }