debug.js 301 B

123456789101112131415
  1. "use strict";
  2. module.exports = function(label) {
  3. var debug;
  4. if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) {
  5. debug = function(message) {
  6. console.error('LOG4JS: (%s) %s', label, message);
  7. };
  8. } else {
  9. debug = function() { };
  10. }
  11. return debug;
  12. };