Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. 'use strict';
  2. const { createLogger, format, transports } = require('winston');
  3.  
  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. });
  13.  
  14. logger.info('Hello world');
  15. logger.debug('Debugging info');
  16. logger.silly('Very verbose silly message');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement