mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
16 lines
301 B
JavaScript
16 lines
301 B
JavaScript
"use strict";
|
|
|
|
module.exports = function(label) {
|
|
var debug;
|
|
|
|
if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) {
|
|
debug = function(message) {
|
|
console.error('LOG4JS: (%s) %s', label, message);
|
|
};
|
|
} else {
|
|
debug = function() { };
|
|
}
|
|
|
|
return debug;
|
|
};
|