wormhole/lib/logger.js
2021-01-26 12:04:53 +02:00

16 lines
No EOL
457 B
JavaScript

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);
}
};