Bug 1914469 - [remote] Reuse the logLevel lazy getter to compute Log.verbose r=webdriver-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D219920
This commit is contained in:
Julian Descottes 2024-09-06 13:09:43 +00:00
parent 9aff670028
commit 9125598ea4

View File

@ -74,9 +74,6 @@ export class Log {
* See https://bugzilla.mozilla.org/show_bug.cgi?id=1828395
*/
static get verbose() {
// we can't use Preferences.sys.mjs before first paint,
// see ../browser/base/content/test/performance/browser_startup.js
const level = Services.prefs.getStringPref(PREF_REMOTE_LOG_LEVEL, "Info");
return StdLog.Level[level] >= StdLog.Level.Info;
return StdLog.Level[lazy.logLevel] >= StdLog.Level.Info;
}
}