mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
16 lines
302 B
JavaScript
16 lines
302 B
JavaScript
'use strict';
|
|
|
|
module.exports = function (label) {
|
|
let 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;
|
|
};
|