Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not log to console by default anymore #161

Open
ld-singh opened this issue Sep 20, 2021 · 2 comments
Open

Does not log to console by default anymore #161

ld-singh opened this issue Sep 20, 2021 · 2 comments

Comments

@ld-singh
Copy link

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'
}));

@ld-singh
Copy link
Author

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()
]
});

@lazywithclass
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants