const environment = process.env.NODE_ENV; const hideInProduction = ['info', 'dbug']; async function out(msg, level = 'othr') { if (environment === 'production' && hideInProduction.includes(level.toLowerCase())) { return; } else { const time = new Date().toISOString(); console.log(`${time} - ${level.toUpperCase()} - ${msg}`); } } module.exports = { out };