From 46f4db9a26ab3b0b1cdd386a74a5e2f2aa439a16 Mon Sep 17 00:00:00 2001 From: Jim Chen Date: Wed, 10 Oct 2018 17:36:13 +0000 Subject: [PATCH] Bug 1497259 - 3. Control GV logging through pref; r=droeh Use the "geckoview.logging" pref to control GV logging. Differential Revision: https://phabricator.services.mozilla.com/D8052 --HG-- extra : moz-landing-system : lando --- mobile/android/app/geckoview-prefs.js | 6 ++++++ mobile/android/modules/geckoview/GeckoViewUtils.jsm | 1 + 2 files changed, 7 insertions(+) diff --git a/mobile/android/app/geckoview-prefs.js b/mobile/android/app/geckoview-prefs.js index e6e92f424bc0..ae96b0de60c8 100644 --- a/mobile/android/app/geckoview-prefs.js +++ b/mobile/android/app/geckoview-prefs.js @@ -18,6 +18,12 @@ pref("toolkit.telemetry.eventping.enabled", false); pref("geckoview.console.enabled", false); +#ifdef RELEASE_OR_BETA +pref("geckoview.logging", "Warn"); +#else +pref("geckoview.logging", "Debug"); +#endif + // Disable Web Push until we get it working pref("dom.push.enabled", false); diff --git a/mobile/android/modules/geckoview/GeckoViewUtils.jsm b/mobile/android/modules/geckoview/GeckoViewUtils.jsm index 333ff113c3e5..9ad4fa0d05b7 100644 --- a/mobile/android/modules/geckoview/GeckoViewUtils.jsm +++ b/mobile/android/modules/geckoview/GeckoViewUtils.jsm @@ -401,6 +401,7 @@ var GeckoViewUtils = { if (!this._rootLogger) { this._rootLogger = Log.repository.getLogger("GeckoView"); this._rootLogger.addAppender(new AndroidAppender()); + this._rootLogger.manageLevelFromPref("geckoview.logging"); } return this._rootLogger; },