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

Prevent monitor from not starting when LogStreamName already exists #257

Merged

Conversation

michaeldimoudis
Copy link
Contributor

Related to issue #244
Description of issue was replied against main issue #244 (comment)

Description of changes:

With the recent addition of a LogStreamName configuration to allow overriding the generated stream name, it was overlooked that the library will throw an exception if that LogStreamName already exists, defeating the purpose of that added feature.

In addition, with the recent CloudWatch improvement of "removing the requirement of providing a sequence token when calling Amazon CloudWatch Logs PutLogEvents API", which this library has implemented, it's probably a good idea to not throw an exeption and crash the monitor if the LogStreamName already exists for any configuration. However for backwards compatibility, a library log will still get logged if that's the case beyond LogStreamName.

Setting a LogStreamName is unusuable after the first run of the logger, hence this PR.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@normj
Copy link
Member

normj commented May 13, 2024

Thanks for the PR. I'll make sure we get this PR released quickly.

@normj normj changed the base branch from master to dev May 13, 2024 16:32
@normj normj merged commit 66402a5 into aws:dev May 13, 2024
@normj
Copy link
Member

normj commented May 13, 2024

Thanks again for the PR and letting us know about the issue. The PR has been released in the latest versions of the logging packages.

@michaeldimoudis
Copy link
Contributor Author

Awesome thanks for the quick release @normj 😀

@michaeldimoudis michaeldimoudis deleted the do-not-crash-monitor-when-logstream-exists branch May 13, 2024 21:21
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.

4 participants