-
Notifications
You must be signed in to change notification settings - Fork 885
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
Clarify prettyPrint documentation #835
Comments
Would you like to send a PR? |
Yaeh, I can remove mentions of |
I think it should be changed by the field |
Sorry, I don't fully understand what
means |
Maybe string is passed when prettifier is used with pipe (as stated in docs - |
I don't understand :/ |
In pretty print docs
it's stated that prettifier function for some reason could get from pino two types of I think that prettifier example could be simplified, because you could write prettifier that works only from code and doesn't support piping logs into it. |
Please read the text in that section of the docs prior to that code sample. It very clearly explains the example. |
There is no info when string can be passed. I wrote prettifier myself, that works with pino, and doesn't work with string. From my point of view prettifier needn't to be a CLI, simple function would suffice for most usages. |
Literally the first sentence in your quote describes when a string will be passed in. If you want to write a prettifier that doesn't support CLI usage, that's your prerogative. But we do not advocate doing so. Our docs outline what we expect in a prettifier to be considered a compliant prettifier. |
Ok, so supplying simple function as prettifier is not how it's supposed to be used?
I used prettifier as simple function to easily migrate from bunyan where 'raw' stream was used to prettify output. Just thought it may be useful to mention in docs. |
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. |
I think that there are some old "code" in the docs about pretty print.
For example this
function. From this #623 I understood that
v
was removed some time ago.Also there is no infromation about why type of inputData could be different. Based on pino code it seems to me that object is always passed. If there are acutally another cases, maybe it will be helpfull to clarify when they are possible.
The text was updated successfully, but these errors were encountered: