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

Allow custom format output for objects / errors #392

Open
Farnsi opened this issue Jan 21, 2023 · 1 comment
Open

Allow custom format output for objects / errors #392

Farnsi opened this issue Jan 21, 2023 · 1 comment

Comments

@Farnsi
Copy link

Farnsi commented Jan 21, 2023

If an optional function is set, e.g. as optionobjectPrettifiers, it should be called in lib/utils.js#L407 instead of the included prettifier.

This would allow to format the data-output with tools like jsome for a better readable dev output.

The same feature errorPrettifiers could be used for errors lib/utils.js#L421, so we could use pino-pretty and add an option to format errors like in pino-pretty-min, example image.

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

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

No branches or pull requests

2 participants