-
Notifications
You must be signed in to change notification settings - Fork 196
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
circular objects blow stack #24
Comments
I can't believe it. The logging library bunyan-gelf uses flat module (https://github.com/craftti/bunyan-gelf/blob/master/lib/bunyan-gelf.js) and it crashes the process when objects containing circular references are given. This is a serious problem in my opinion because depending on the data you send to a function you process crashes. |
Also wishing this was supported, just realized my own logger has the same issue. |
I would suggest sanitizing the data prior to calling Flat. You can use something like fast-safe-stringify and follow their replacer example. It will still keep it as an object but will replace the circular reference with "[Circular]" |
need to https://www.npmjs.com/package/destroy-circular or something
The text was updated successfully, but these errors were encountered: