How does one tell Winston to log multiple levels to a single transport? For example, if you want to log both info and error level items to the console, how would you accomplish this? Specifying info does not log all levels that are info level and more critical, it just logs info. Passing an array of levels to the level property does nothing.
winston.add(winston.transports.Console, {
colorize: true,
level: 'info'
});
or
winston.add(winstonMongo, {
safe: false,
db: 'logs',
collection: 'api',
level: 'info'
});
Specifying the
infolevel does include all levels that are more severe (eg:warn,error,debug). Likewise, specifyingwarnincludes thewarnlevel, plus the more severeerrorlevel.