Winston uses different log levels. By default, they are:
error
warn
info
http
verbose
debug
silly
You can configure the level of logging you want. For example, if you only want to log info
and above, you set the level to info
.
const logger = winston.createLogger({
level: 'info',
format: winston.format.json(),
transports: [
new winston.transports.Console()
]
});
Leave a Reply