From a571f64266425bcbf6dd83b0479c7960c0a82c2f Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Mon, 5 Jun 2017 14:10:32 -0700 Subject: [PATCH 1/2] Log to stdout on all platforms except Android Fixes a Fuchsia breakage introduced in dcfcc9259d4f4321e8daea24f1778694a8dca98a. --- lib/ui/dart_runtime_hooks.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/dart_runtime_hooks.cc b/lib/ui/dart_runtime_hooks.cc index d4a4af61b6b2a..5ca5d68e4dc6d 100644 --- a/lib/ui/dart_runtime_hooks.cc +++ b/lib/ui/dart_runtime_hooks.cc @@ -143,9 +143,9 @@ void Logger_PrintString(Dart_NativeArguments args) { // Write to the logcat on Android. const char* tag = Settings::Get().log_tag.c_str(); __android_log_print(ANDROID_LOG_INFO, tag, "%.*s", (int)length, chars); -#elif defined(__APPLE__) || defined(OS_LINUX) - // On iOS and in flutter_tester (on both macOS and Linux, write directly to - // stdout. On iOS, this is redirected to ASL via +#else + // On Fuchsia, iOS and in flutter_tester (on both macOS and Linux, write + // directly to stdout. On iOS, this is redirected to ASL via // RedirectIOConnectionsToSyslog in platform_mac.mm. // TODO(cbracken) replace with dedicated (non-stdout) logging on iOS. fwrite(chars, 1, length, stdout); From c256afdb169e886db83ee25d2555c3a52587d828 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Mon, 5 Jun 2017 14:16:02 -0700 Subject: [PATCH 2/2] Punctuation --- lib/ui/dart_runtime_hooks.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/dart_runtime_hooks.cc b/lib/ui/dart_runtime_hooks.cc index 5ca5d68e4dc6d..533ed6fb3aa6d 100644 --- a/lib/ui/dart_runtime_hooks.cc +++ b/lib/ui/dart_runtime_hooks.cc @@ -144,10 +144,10 @@ void Logger_PrintString(Dart_NativeArguments args) { const char* tag = Settings::Get().log_tag.c_str(); __android_log_print(ANDROID_LOG_INFO, tag, "%.*s", (int)length, chars); #else - // On Fuchsia, iOS and in flutter_tester (on both macOS and Linux, write + // On Fuchsia, iOS and in flutter_tester (on both macOS and Linux), write // directly to stdout. On iOS, this is redirected to ASL via // RedirectIOConnectionsToSyslog in platform_mac.mm. - // TODO(cbracken) replace with dedicated (non-stdout) logging on iOS. + // TODO(cbracken): replace with dedicated (non-stdout) logging on iOS. fwrite(chars, 1, length, stdout); fputs("\n", stdout); fflush(stdout);