browser-logging-transport
Version:
Send logging data from browser to server
17 lines • 698 B
JavaScript
!function (root, factory) {
"function" == typeof define && define.amd ? define("BLT", [], function () {
return root.mymodule = factory()
}) : "object" == typeof module && module.exports ? module.exports = factory() : root.BLT = factory()
}(this, function () {
"use strict";
return function (boundTransportFn) {
Object.keys(console).forEach(function (key) {
var f;
(f = console[key]) && "function" == typeof f && (console[key] = function () {
Object.values(arguments).forEach(function (a) {
boundTransportFn(a, key)
}), f.apply(console, arguments)
})
})
}
});