a guest Oct 17th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2. const { createLogger, format, transports } = require('winston');
  4. const logger = createLogger({
  5.   // Change the level on the next line from 'debug' to 'silly' to enable messages logged
  6.   // with the silly logging threshold to be logged to the output.
  7.   level: 'silly',
  8.   format: format.simple(),
  9.   // You can also comment out the line above and uncomment the line below for JSON format
  10.   // format: format.json(),
  11.   transports: [new transports.Console()]
  12. });
  14.'Hello world');
  15. logger.debug('Debugging info');
  16. logger.silly('Very verbose silly message');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand