Skip to content

Commit 9af413c

Browse files
authored
Log to stdout in flutter_tester (flutter#3728)
Fixes a regression introduced in dcfcc92 in flutter_tester on Linux.
1 parent dcfcc92 commit 9af413c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/ui/dart_runtime_hooks.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ void Logger_PrintString(Dart_NativeArguments args) {
142142
#if defined(OS_ANDROID)
143143
// Write to the logcat on Android.
144144
const char* tag = Settings::Get().log_tag.c_str();
145-
__android_log_print(ANDROID_LOG_INFO, tag, "%.*s", (int)length,
146-
chars);
147-
#elif __APPLE__
148-
// Write directly to stdout on iOS, which is redirected to ASL via
145+
__android_log_print(ANDROID_LOG_INFO, tag, "%.*s", (int)length, chars);
146+
#elif defined(__APPLE__) || defined(OS_LINUX)
147+
// On iOS and in flutter_tester (on both macOS and Linux, write directly to
148+
// stdout. On iOS, this is redirected to ASL via
149149
// RedirectIOConnectionsToSyslog in platform_mac.mm.
150-
// TODO(cbracken) replace with dedicated (non-stdout) logging.
150+
// TODO(cbracken) replace with dedicated (non-stdout) logging on iOS.
151151
fwrite(chars, 1, length, stdout);
152152
fputs("\n", stdout);
153153
fflush(stdout);

0 commit comments

Comments
 (0)