Reset min log levels on each engine launch. (flutter/engine#8343)

This commit is contained in:
Chinmay Garde
2019-03-28 11:21:25 -07:00
committed by GitHub
parent 1cb1983435
commit f3080acb10
2 changed files with 7 additions and 8 deletions

View File

@@ -163,17 +163,17 @@ static void RecordStartupTimestamp() {
// that cause shell initialization failures will still lead to some of their
// settings being applied.
static void PerformInitializationTasks(const blink::Settings& settings) {
{
fml::LogSettings log_settings;
log_settings.min_log_level =
settings.verbose_logging ? fml::LOG_INFO : fml::LOG_ERROR;
fml::SetLogSettings(log_settings);
}
static std::once_flag gShellSettingsInitialization = {};
std::call_once(gShellSettingsInitialization, [&settings] {
RecordStartupTimestamp();
{
fml::LogSettings log_settings;
log_settings.min_log_level =
settings.verbose_logging ? fml::LOG_INFO : fml::LOG_ERROR;
fml::SetLogSettings(log_settings);
}
tonic::SetLogHandler(
[](const char* message) { FML_LOG(ERROR) << message; });

View File

@@ -173,7 +173,6 @@ TEST_F(EmbedderTest, CanSpecifyCustomTaskRunner) {
thread.GetTaskRunner()->PostTask([&]() {
EmbedderConfigBuilder builder(context);
builder.AddCommandLineArgument("--verbose-logging");
const auto task_runner_description = runner.GetEmbedderDescription();
runner.SetForwardingTaskRunner(
fml::MessageLoop::GetCurrent().GetTaskRunner());