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');
Leave a Reply