Basic Usage

Here’s a simple example to get you started:

const winston = require('winston');

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.simple(),
  transports: [
    new winston.transports.Console()
  ]
});

logger.info('This is an info message');
logger.error('This is an error message');

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *