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

Rendering of objects with console.log #27738

Closed
Aleuka opened this issue May 16, 2019 · 6 comments
Closed

Rendering of objects with console.log #27738

Aleuka opened this issue May 16, 2019 · 6 comments
Labels
console Issues and PRs related to the console subsystem. question Issues that look for answers. util Issues and PRs related to the built-in util module.

Comments

@Aleuka
Copy link

Aleuka commented May 16, 2019

I updated to v12 and noticed that rendering of objects became more 'compact' (string splitting, arrays in multiple rows). Is it possible to get the old rendering back?

@devsnek devsnek added the util Issues and PRs related to the built-in util module. label May 16, 2019
@devsnek
Copy link
Member

devsnek commented May 16, 2019

Duplicate of #27690

@devsnek devsnek marked this as a duplicate of #27690 May 16, 2019
@devsnek devsnek closed this as completed May 16, 2019
@devsnek devsnek added console Issues and PRs related to the console subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. labels May 16, 2019
@Aleuka
Copy link
Author

Aleuka commented May 16, 2019

Duplicate of #27690

How do I fix this though?

@BridgeAR
Copy link
Member

BridgeAR commented May 16, 2019

@Aleuka it is possible to reset the mode with util.inspect.defaultOptions.compact = true. Or if you're in the repl: util.inspect.replOptions.compact = true. You can also define your own console and pass through the inspection options as you prefer them. And it's always possible to use util.inspect or util.format directly and pass through the options that you prefer.

@devsnek I don't think this is a duplicate.

@BridgeAR BridgeAR added question Issues that look for answers. and removed duplicate Issues and PRs that are duplicates of other issues or PRs. labels May 16, 2019
@devsnek
Copy link
Member

devsnek commented May 16, 2019

@BridgeAR string splitting, arrays in multiple row is what #27690 is about

@Aleuka
Copy link
Author

Aleuka commented May 16, 2019

@BridgeAR Thank you very much!

@BridgeAR
Copy link
Member

@devsnek the other issue did not mention anything about the array grouping functionality.

@Aleuka you're welcome. I'm glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues and PRs related to the console subsystem. question Issues that look for answers. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

No branches or pull requests

3 participants