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

Circular references passed to logger explode #555

Closed
tswaters opened this issue Sep 21, 2016 · 0 comments · Fixed by #556
Closed

Circular references passed to logger explode #555

tswaters opened this issue Sep 21, 2016 · 0 comments · Fixed by #556

Comments

@tswaters
Copy link
Member

I reported this under seneca-web (senecajs/seneca-web#91) as I encountered it there. When seneca-web encounters an error, it will attempt to log the argument payload which includes req and res, which are circular and effectively blows up the process.

This line specifically is where the problem is: https://github.com/senecajs/seneca/tree/v3.1.0/lib/logging.js#L45

This should probably be wrapped in a try/catch. Maybe try to parse out the object tree one level at a time so you can see at least some of the payload similar to node's util.inspect function.

Maybe just use util.inspect??

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 a pull request may close this issue.

1 participant