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

fix(logging): Use flatten only if config is circular. #3332

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

johnjbarton
Copy link
Contributor

While flatten is accurate and works with circular data, it's too hard to read.
By using vanilla json for most cases the log will be clearer.

@johnjbarton johnjbarton requested a review from kyliau June 24, 2019 16:58
Copy link
Collaborator

@kyliau kyliau left a comment

Choose a reason for hiding this comment

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

Why not just use native util.inspect()? It handles circular references well.

https://nodejs.org/api/util.html#util_util_inspect_object_options

While flatten is accruate and works with circular data, it's too hard to read.
@johnjbarton
Copy link
Contributor Author

Well that's a lot better! done

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 this pull request may close these issues.

2 participants