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

refactor!: batch logs and periodically flush buffer #11

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

mdeltito
Copy link
Member

@mdeltito mdeltito commented Sep 1, 2020

BREAKING CHANGE:

  • rename CreateLogger to NewLogger to better align with best practice
  • break out transport code and reimplement FlushInterval
    • logs are now flushed periodically - new default is 250ms
    • logs are also async flushed when hitting the MaxBufferLen
    • maxBufferLen default increased to 50
  • logs are now batched when sending, up to MaxBufferLen
  • add a configurable SendTimeout, default of 5 seconds

Semver: major
Ref: LOG-6965

@mdeltito mdeltito requested review from dm36, zeldanut and a team September 1, 2020 20:42
@mdeltito mdeltito marked this pull request as draft September 2, 2020 03:06
@mdeltito mdeltito removed request for a team, dm36 and zeldanut September 2, 2020 03:06
@mdeltito mdeltito marked this pull request as ready for review September 2, 2020 13:27
@mdeltito mdeltito requested review from dm36, zeldanut and a team September 2, 2020 13:27
dm36
dm36 previously approved these changes Sep 2, 2020
@dm36 dm36 requested review from a team and smusali September 2, 2020 20:16
BREAKING CHANGE:
* rename CreateLogger to NewLogger to better align with best practice
* break out transport code and reimplement FlushInterval
  * logs are now flushed periodically - new default is 250ms
  * logs are also async flushed when hitting the MaxBufferLen
  * maxBufferLen default increased to 50
* logs are now batched when sending, up to MaxBufferLen
* add a configurable SendTimeout, default of 5 seconds

Semver: major
Ref: LOG-6965
Copy link
Contributor

@smusali smusali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following the best practices and the patterns, it lgtm

@mdeltito mdeltito merged commit aa78e96 into master Sep 9, 2020
@mdeltito mdeltito deleted the mdeltito/LOG-6965 branch September 9, 2020 13:44
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