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

Avoid recursion when using the console plugin #373

Closed
benoitg opened this issue Aug 21, 2015 · 3 comments
Closed

Avoid recursion when using the console plugin #373

benoitg opened this issue Aug 21, 2015 · 3 comments

Comments

@benoitg
Copy link
Contributor

benoitg commented Aug 21, 2015

Ok, let's try to clarify:

Issue is that logDebug in sentry causes infinite recursion if Raven.debug is true and the console plugin is used.

Test case (still failing as of today):

<script src="./dist/raven.js"></script>
<script src="./plugins/console.js"></script>

<script>
Raven.debug = true;
console.error("Something");
Raven.captureException('test');
</script>
@benoitg
Copy link
Contributor Author

benoitg commented Aug 21, 2015

@mattrobenolt @benvinegar If the root issue is too hard to fix, may I suggest again that (at least temporarily) logDebug only call console.log instead of obeying it's level parameter? This will avoid triggering the console plugin, and still give us our output.

What do you think?

@mattrobenolt
Copy link
Contributor

@benoitg Yeah, I think that's reasonable for now.

benoitg added a commit to benoitg/raven-js that referenced this issue Aug 25, 2015
…ng raven-js when both the console plugin is loaded and Raven.debug===true.
@benoitg
Copy link
Contributor Author

benoitg commented Aug 25, 2015

Patch in #374

benvinegar added a commit that referenced this issue Aug 25, 2015
Preserve original console methods (fixes #373)
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

No branches or pull requests

2 participants