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

Fix: Create log groups when missing #184

Merged
merged 2 commits into from Apr 23, 2022

Conversation

dev-guy
Copy link
Contributor

@dev-guy dev-guy commented Mar 26, 2022

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).

@terrisgit
Copy link

terrisgit commented Mar 27, 2022

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.

@ivikash
Copy link

ivikash commented Apr 22, 2022

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 👍

@lazywithclass lazywithclass merged commit ab115c8 into lazywithclass:master Apr 23, 2022
@lazywithclass
Copy link
Owner

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.

@ivikash
Copy link

ivikash commented Apr 25, 2022

Thank-You!

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

Successfully merging this pull request may close these issues.

None yet

4 participants