{"version":3,"file":"log.min.js","sources":["../src/log.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * This is an empty module, that is required before all other modules.\n * Because every module is returned from a request for any other module, this\n * forces the loading of all modules with a single request.\n *\n * @module core/log\n * @copyright 2015 Andrew Nicols <andrew@nicols.co.uk>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(['core/loglevel'], function(log) {\n var originalFactory = log.methodFactory;\n log.methodFactory = function(methodName, logLevel) {\n var rawMethod = originalFactory(methodName, logLevel);\n\n return function(message, source) {\n if (source) {\n rawMethod(source + \": \" + message);\n } else {\n rawMethod(message);\n }\n };\n };\n\n /**\n * Set default config settings.\n *\n * @param {Object} config including the level to use.\n * @method setConfig\n */\n log.setConfig = function(config) {\n if (typeof config.level !== \"undefined\") {\n log.setLevel(config.level);\n }\n };\n\n return log;\n});\n"],"names":["define","log","originalFactory","methodFactory","methodName","logLevel","rawMethod","message","source","setConfig","config","level","setLevel"],"mappings":";;;;;;;;;AAwBAA,kBAAO,CAAC,kBAAkB,SAASC,SAC3BC,gBAAkBD,IAAIE,qBAC1BF,IAAIE,cAAgB,SAASC,WAAYC,cACjCC,UAAYJ,gBAAgBE,WAAYC,iBAErC,SAASE,QAASC,QAEjBF,UADAE,OACUA,OAAS,KAAOD,QAEhBA,WAWtBN,IAAIQ,UAAY,SAASC,aACO,IAAjBA,OAAOC,OACdV,IAAIW,SAASF,OAAOC,QAIrBV"}