Open nsoft opened 1 year ago
The linked example is an example of potential user code, not an example of what is provided by the library. Improvements to the documentation are welcome.
As for any error, please provide the text of the error. Also, please provide a minimal reproducible example. Doing so will help us diagnose your issue. It should be the bare minimum code needed to trigger the issue, and easily runnable without any changes or extra code.
You may use a GitHub repository to host the code if it is too much to fit in a code block (or two).
If I define a log target with options that include customPretifiers as shown in Readme.md two problems arise:
1) The functions shown in the example don't seem to exist 2) Even if I define my own version of the function one gets a data clone error...
https://github.com/pinojs/pino-pretty/blob/master/Readme.md#handling-non-serializable-options suggests a possible solution, but it didn't seem to work (at least not for trying to colorize an attribute from the merge object)
stdLogTarget.ts
logger.ts
That runs but neither the color nor the "foo" is added. (yes naming of some things needs improvement, not final form)
I think the docs make clear that the functions listed don't exist (or if they do say where to find them), and provide examples that are in working form.