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

Limit logging #93

Merged
merged 1 commit into from
May 27, 2021
Merged

Limit logging #93

merged 1 commit into from
May 27, 2021

Conversation

wagenet
Copy link
Contributor

@wagenet wagenet commented Feb 24, 2021

Limits console log to avoid causing ember server to hang which can happen if there is too much logging.

@wagenet wagenet marked this pull request as ready for review April 2, 2021 00:29
let secondExpected = `DEPRECATION: ${secondMessage}`;

let secondCount = 0;
window.Testem.handleConsoleMessage = function (passedMessage) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this torn down by testem after each test? I've not used it before. It seems like it would leak between tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’m not sure. I just copied the prior test assuming it did the right thing.

Choose a reason for hiding this comment

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

Seems like it is handled in the before/after callbacks above

Choose a reason for hiding this comment

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

oh is this a thing? There are so many logs I would like to silence that aren't even deprecation related. I wish testem would always just not-print logs by default. in CI.

@wagenet
Copy link
Contributor Author

wagenet commented May 26, 2021

@mixonic can we get this merged?

@boris-petrov
Copy link

@wagenet - perhaps make the log limit configurable?

@wagenet
Copy link
Contributor Author

wagenet commented May 26, 2021

@boris-petrov I'm not opposed to that, but I also don't see it being a necessity either. 100 should be far more than enough and resolve the problem of the runner hanging due to thousands of messages.

@boris-petrov
Copy link

Exactly - 100 may be much more than someone's preference. :)

@wagenet
Copy link
Contributor Author

wagenet commented May 26, 2021

Yeah, my concern was less about preference and more about making sure the runner doesn't crash!

@mixonic mixonic mentioned this pull request May 27, 2021
5 tasks
@mixonic mixonic added the 2.0 2.0 blockers, see https://github.com/mixonic/ember-cli-deprecation-workflow/issues/109 label May 27, 2021
@mixonic
Copy link
Member

mixonic commented May 27, 2021

I've rebased this on master to pick up #111 which I expect brings us a green test suite.

I suspect this is behavior we would like Ember itself to provide if effect of too much logging is "testem crashes". That doesn't block landing it here though!

Thanks @wagenet

@mixonic mixonic merged commit ff81357 into ember-cli:master May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 2.0 blockers, see https://github.com/mixonic/ember-cli-deprecation-workflow/issues/109
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants