Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 719b4c5e30 Bug 1482829 - Track Marionette logger verbosity with Log#manageLevelFromPref. r=whimboo
This patch adopts Logger#managerLevelFromPref from Log.jsm to set
and keep track of the Marionette logger's verbosity.

This has the advantage that we do not have to roll separate
implementations of Log for the child- and parent processes.  It also
has the upside that the log level will be reflected when changed
at runtime through the use of an observer.
2018-08-17 12:55:33 +01:00
Andreas Tolfsen 583e0a9e7d Bug 1464469 - Shorthands for setting up Marionette logger. r=whimboo
This patch generalises logger setup and access by providing
one interface with specialised implementations for the main-
and child processes.  This will mean we can get rid of ad-hoc
logger setup in testing/marionette/components/marionette.js and
testing/marionette/listener.js.

In the case for the component file, the log level and the stdout
dump appender is set up when you request the logger.  The same is
true when requesting the logger in a child process, but it will
additionally request the log level from the main process.

Usage:

    const {Log} = ChromeUtils.import("chrome://marionette/content/log.js", {});
    let log = Log.get();

MozReview-Commit-ID: 8Ha5FSaoGXp

--HG--
extra : rebase_source : 0ad13e805cd1c6a4a8332fdbe6124a82719c4656
2018-06-06 14:32:18 +01:00