From 4555fcca31c05c2f90455eabf208356b78c492b8 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 15 Aug 2018 14:28:24 -0700 Subject: [PATCH] Re-apply "Log Tonic errors with FML_LOG" (flutter/engine#6026) This reverts commit 201900fd6354a0f1a9318e31f101e05aeea612bd and updates the tonic SHA. --- DEPS | 2 +- engine/src/flutter/shell/common/shell.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DEPS b/DEPS index ba56192a84..2437d2068c 100644 --- a/DEPS +++ b/DEPS @@ -123,7 +123,7 @@ deps = { # and not have to specific specific hashes. 'src/third_party/tonic': - Var('fuchsia_git') + '/tonic' + '@' + '57d508b12462db686573edcbc97891d90cf92f90', + Var('fuchsia_git') + '/tonic' + '@' + '6bab0f304b043d8cf09900334e78b63111f76c5c', 'src/third_party/benchmark': Var('fuchsia_git') + '/third_party/benchmark' + '@' + '296537bc48d380adf21567c5d736ab79f5363d22', diff --git a/engine/src/flutter/shell/common/shell.cc b/engine/src/flutter/shell/common/shell.cc index 5017a2c607..5afe07691e 100644 --- a/engine/src/flutter/shell/common/shell.cc +++ b/engine/src/flutter/shell/common/shell.cc @@ -28,6 +28,7 @@ #include "flutter/shell/common/vsync_waiter.h" #include "third_party/dart/runtime/include/dart_tools_api.h" #include "third_party/skia/include/core/SkGraphics.h" +#include "third_party/tonic/common/log.h" #ifdef ERROR #undef ERROR @@ -176,6 +177,9 @@ static void PerformInitializationTasks(const blink::Settings& settings) { fml::SetLogSettings(log_settings); } + tonic::SetLogHandler( + [](const char* message) { FML_LOG(ERROR) << message; }); + if (settings.trace_skia) { InitSkiaEventTracer(settings.trace_skia); }