Skip to content

Instantly share code, notes, and snippets.

@downzer0
Created August 13, 2018 14:57
Show Gist options
  • Save downzer0/6549b837e146b36f91423f999638bc27 to your computer and use it in GitHub Desktop.
Save downzer0/6549b837e146b36f91423f999638bc27 to your computer and use it in GitHub Desktop.
logger.js
/* eslint no-console: off */
const chalk = require('chalk');
const log = (...args) => console.log(...args);
const warn = (...args) => console.warn(chalk.yellow(...args));
const error = (...args) => console.error(chalk.redBright(...args));
const success = (...args) => console.log(chalk.green(...args));
module.exports = { log, warn, error, success };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment