Closed Bug 1553142 Opened 4 months ago Closed 4 months ago

Leverage Console.jsm to add more logging to Remote Settings

Categories

(Firefox :: Remote Settings Client, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: leplatrem, Assigned: leplatrem)

References

Details

Attachments

(1 file)

This seems to be a common pattern:

// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
// See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error".
const PREF_LOG_LEVEL = "services.settings.loglevel";
XPCOMUtils.defineLazyGetter(this, "log", () => {
  const {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
  const consoleOptions = {
    maxLogLevel: "info",
    maxLogLevelPref: PREF_LOG_LEVEL,
    prefix: "services.settings",
  };
  return new ConsoleAPI(consoleOptions);
});
Assignee: nobody → mathieu
Pushed by mleplatre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f7859742667
Leverage ConsoleAPI in Remote Settings r=glasserc
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Regressions: 1556761
You need to log in before you can comment on or make changes to this bug.