wormhole/lib/logger.js

16 lines
457 B
JavaScript
Raw Normal View History

2021-01-26 12:04:53 +02:00
const logDebug = true;
module.exports = {
createLog: (components) => (...args) => {
let compString = '';
for (const i in components) {
const component = components[i];
if (i >= (components.length - 1)) {
compString += `[${component}]`;
} else {
compString += `[${component}] `;
}
}
logDebug && console.log(compString, ...args);
}
};