winston-cloudwatch
winston-cloudwatch copied to clipboard
Does not log to console by default anymore
We have been using winston-cloudwatch version 1.5.0 and recently upgraded to version 3.0.0 It used to logs in console and cloudwatch both. But now it logs all infos in cloudwatch and only errors in console. What can we do to log again in both cloudwatch and console?
winston.add(new WinstonCloudWatch({ logGroupName: 'testing', logStreamName: 'first' }));
Do i need to create like this now with latest version to log in both cloudwatch and console? const logger = winston.createLogger({ transports: [ new WinstonCloudWatch({ logGroupName: 'testing', logStreamName: 'first' }), new winston.transports.Console() ] });
I've added an example that works for the latest version: https://github.com/lazywithclass/winston-cloudwatch/blob/master/examples/simple-with-console.js
Let me know if you still have issues.