Files
tubestation/toolkit/components/payments/res/log.js
Matthew Noorenberghe 12ab72b8a0 Bug 1444949 - Pref-controlled console logging for unprivileged code. r=sfoster
* Default log implementation for unprivileged content
* Export methods of a ConsoleAPI instance into the content frame to replace the default log
* Initialize the content logger when the "initializeRequest" message is received

MozReview-Commit-ID: 8hiaIqf2ChX
2018-03-19 21:57:13 -07:00

30 lines
760 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* This file defines a fallback log object to be used during development outside
* of the paymentDialogWrapper. When loaded in the wrapper, a frame script
* providing pref-controlled logging overwrites these methods.
*/
/* eslint-disable no-console */
/* exported log */
"use strict";
var log = {
error(...args) {
console.error("log.js", ...args);
},
warn(...args) {
console.warn("log.js", ...args);
},
info(...args) {
console.info("log.js", ...args);
},
debug(...args) {
console.debug("log.js", ...args);
},
};