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

User-defined log stream prefix (issue #83) #84

Merged
merged 1 commit into from
Jun 27, 2019
Merged

User-defined log stream prefix (issue #83) #84

merged 1 commit into from
Jun 27, 2019

Conversation

bartpio
Copy link
Contributor

@bartpio bartpio commented May 8, 2019

Issue #83

Added LogStreamPrefix to allow the library user, optionally, to specify a user-defined segment of the log stream prefix. If specified, the log stream name will begin with this user-defined segment, followed by the system-defined prefix segment of the yyyy/mm/dd form, then followed by the suffix (user defined or system defined, as in prior state).

Enhanced unit tests for all supported unit test frameworks to test LogStreamPrefix in a manner similar to the pre-existing LogStreamSuffix.

The design invariant that a unique date-based component be included in the log stream name is maintained.

Backwards compatibility is maintained, as leaving the LogStreamPrefix null or empty results in behavior identical to the prior state.

As per design of the CloudWatch log stream enumeration API, this allows for significantly more efficient filtered enumeration of log streams within a log group, when the user wants to filter by a meaningful (rather than date-based) prefix. see logStreamNamePrefix property

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

@klaytaybai
Copy link

@bartpio, thanks for working on this. I'm curious on anyone's opinion of whether setting a non-empty custom prefix and an empty custom suffix should remove the hyphen '-' that would otherwise exist between the date and the suffix.

@normj
Copy link
Member

normj commented Jun 25, 2019

I have merged this into the dev branch to go out with the next release.

@normj normj merged commit 01fdaaf into aws:master Jun 27, 2019
@normj
Copy link
Member

normj commented Jun 27, 2019

All of the logging libraries have been released with this PR. Thanks for the PR.

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.

3 participants