logging.js 288 B

12345678910111213141516
  1. var config = require("./config");
  2. var exp = {};
  3. function debug() {
  4. if (config.debug_enabled) {
  5. console.log(Array.prototype.slice.call(arguments).join(" "));
  6. }
  7. }
  8. exp.log = console.log;
  9. exp.warn = console.warn;
  10. exp.error = console.error;
  11. exp.debug = debug;
  12. module.exports = exp;