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

Support for printing objects #16

Closed
pbadenski opened this issue Mar 19, 2020 · 3 comments
Closed

Support for printing objects #16

pbadenski opened this issue Mar 19, 2020 · 3 comments
Assignees

Comments

@pbadenski
Copy link

Currently, if object is logged to the console you see: cons:info ⓘ [object Object].

It would be great if it would display contents of the object instead. A few ideas:

  • in most cases JSON.stringify would be sufficient
  • allow to enabled on a flag to avoid spamming
  • allow to provide a custom formatter for objects
@archfz
Copy link
Owner

archfz commented Mar 19, 2020

What do you mean by custom formatter? What would be the use case?

@pbadenski
Copy link
Author

Oh I think I'm bike shedding a bit. The easiest way is to add JSON.stringify.. I'm thinking for people who log very large objects they might want to customise this. I personally don't have this use case, so I would be totally comfortable with simple JSON.stringify.

@archfz archfz self-assigned this Apr 4, 2020
@archfz
Copy link
Owner

archfz commented Apr 4, 2020

Implemented and released in 1.2.0.

@archfz archfz closed this as completed Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants