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 a new console logger for each snapshot #407

Merged
merged 7 commits into from
Oct 30, 2019

Conversation

Robdel12
Copy link
Contributor

What is this?

After extensive debugging, I was able to trace MaxListenersExceededWarning (#402) back to Winston and our console logger: winstonjs/winston#1334

On lower resource machines, we were sending more logs than the stream could handle. To fix this, we now create a console logger for each snapshot, so they each have their own stream to operate on.

Copy link
Contributor

@wwilsman wwilsman left a comment

Choose a reason for hiding this comment

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

Only real change request is the promise creation within async. It doesn't seem like that should be necessary since async () => {} implies () => return new Promise. Also though, loops are normally blocking unless the handlers we're testing are attached async (I don't think they are), so you might not even need the async at all for that loop.

The other two comments are nits

test/utils/logger.test.ts Outdated Show resolved Hide resolved
test/utils/logger.test.ts Outdated Show resolved Hide resolved
test/utils/logger.test.ts Outdated Show resolved Hide resolved
@Robdel12 Robdel12 merged commit f63b832 into master Oct 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the rd/winston-new-console-logger branch October 30, 2019 18:26
djones pushed a commit that referenced this pull request Oct 30, 2019
## [0.19.5](v0.19.4...v0.19.5) (2019-10-30)

### Bug Fixes

* Create a new console logger for each snapshot ([#407](#407)) ([f63b832](f63b832))
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

2 participants