Stackedit/public/res/logger.js

13 lines
374 B
JavaScript
Raw Normal View History

2013-11-05 23:03:38 +00:00
define([], function () {
// Defines the logger object
var logger = {
log: function () {},
info: function () {},
warn: function () {},
error: function () {}
};
// We can run StackEdit with http://.../?console to print logs in the console
return (/(\?|&)console($|&)/).test(location.search) ? console : logger;
});