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

Improve prettifier documentation #510

Closed
felixheck opened this issue Aug 31, 2018 · 8 comments
Closed

Improve prettifier documentation #510

felixheck opened this issue Aug 31, 2018 · 8 comments

Comments

@felixheck
Copy link

Hi there!

AFAIK, since the v5 release and the integration of pretty-pino the prettyPrint.formatter option is useless.

Is there an easy way to migrate the prettyPrint.formatter option to v5 though? 😔

Cheers!

@mcollina
Copy link
Member

what do you mean?

@felixheck
Copy link
Author

There was a prettyPrint.formatter option in pino <=4 — this option is not available because pino-pretty doesn’t support such option.

And since I try to stay up to date, I’m looking for an alternative way to format the output.

@mcollina
Copy link
Member

Oh, we have internalized that functionality and forgot to write the docs: #478.

@mcollina
Copy link
Member

Actually there is non-documented (mistake) API https://github.com/pinojs/pino/blob/master/lib/tools.js#L159-L170. passing a prettifier function would do the same function of prettyPrint.formatter.

Would you like to help and figure out the docs?

@felixheck
Copy link
Author

Ah awesome 🙌🏼
Gonna try to fire a PR tomorrow in the plane — otherwise after my holiday 😊

Thanks Matteo!

@jsumners
Copy link
Member

Yes it is documented -- http://getpino.io/#/docs/pretty?id=prettifier-api

@mcollina
Copy link
Member

I think we can do a bit better, the example is not really self-explanatory.

The reference implementation of such a module is the pino-pretty module. To learn more about creating a custom prettifier module, refer to the pino-pretty source code.

We can actually explain this.

@mcollina mcollina reopened this Aug 31, 2018
@davidmarkclements davidmarkclements changed the title Smart alternative to prettyPrint.formatter in pino v5 Improve prettifier documentation Dec 20, 2018
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants