Log.prototype[severity] functions cannot deal with circular references#1983
Log.prototype[severity] functions cannot deal with circular references#1983stephenplusplus merged 4 commits intogoogleapis:masterfrom
Log.prototype[severity] functions cannot deal with circular references#1983Conversation
|
We chose to throw the error instead of hiding it and removing part of the user's object. My thoughts on that were explained in this issue. Please discuss in that issue if you have reasons that's a bad idea on our part. 1) Logging logs should write a single entry to a log:
Error: The JSON data for this entry has a circular reference. |
|
Either we should test with A large stack overflow in I think this is a distinct issue. |
|
We throw a small error as I pasted above. Maybe I'm not seeing what you're seeing. Can you paste the output you're seeing? |
|
I guess it depends on test ordering. I bypassed some of the tests because the system tests aren't working for me (#1982). Try |
|
Okay, I reproduced. We definitely should check with |
4ee0f3e to
674803a
Compare
|
Here's a better fix. @stephenplusplus PTAL. |
packages/logging/src/log.js
Outdated
| severity: severity | ||
| } | ||
| }); | ||
| var entry = extend(new Entry(), entry); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
Cool, thanks! |
Right now the PR adds a test that shows this. What are your thoughts on the fix? The simplest fix would be to fix
Log.assignSeverityToEntries_but am concerned that the problem may exist in other places too.