Closed dev-guy closed 2 years ago
This is published to npm at https://www.npmjs.com/package/@goodware/winston-cloudwatch and will be taken down as soon as this issue is resolved. I need Winston-cloudwatch to be able to create log groups. By the way, the unit tests pass with the PR - previously they did not.
When ensureLogGroup
is true
and logGroupName
& logStreamName
is not present in Amazon CloudWatch then winston-cloudwatch
is unable to create the log and constantly throws the error - ResourceNotFoundException
.
As per my testing, this PR fixes the issue. @dev-guy Thank-You for the PR 🏆
@lazywithclass Waiting for the next release 👍
I thought I already added this change, thanks a lot for your efforts.
You will find this in winston-cloudwatch@6.0.0; as always sorry for being so late with the release.
Thank-You!
Overview
When the ensureLogGroup option is true, the log group will be created if it is missing.
Changes
Use err.name instead of err.code for AWS errors. This appears to be a consequence of using @aws-sdk (v3) instead of aws-sdk (v2).