We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Instead of your typical console.log, we use a logging component.
console.log
Logging module is in lib folder. Import lib/log.js and pass __filename in as an argument.
lib
lib/log.js
__filename
const logger = require('./lib/log')(__filename)
Replace console.log to logger.info.
logger.info
logger.info('function has successfully run')
You can add logger with any information you want to log and apply different levels according to its importance.
logger.error('an error has occured')
logger.warn('warning!')